telly / TLYShyNavBar

Unlike all those arrogant UINavigationBar, this one is shy and humble! Easily create auto-scrolling navigation bars!
MIT License
3.73k stars 427 forks source link

Navigation controller is jumping while scroll #120

Open ikousik opened 8 years ago

ikousik commented 8 years ago

I have integrated TLYShyNavBar with UITableView in my project. After a couple weeks I found that there is one very basic bug. Navigation controller is keep on jumping unexpectedly for a fix number of cell. Most of the time if TableView height is almost equal to the ViewController.

Just run the demo project and change in TLYTableViewController.m file numberOfSectionsInTableView and numberOfRowsInSection

numberOfSectionsInTableView = 1 numberOfRowsInSection = 13 or 14 (for 12 and 15 it's working fine) in iphone 5 and 6

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return 13;
}
Mazyod commented 8 years ago

Very strange, I will try looking into it as soon as I find the time.

ikousik commented 8 years ago

Thanks :)

szweier commented 8 years ago

@ikousik give this a shot https://github.com/telly/TLYShyNavBar/pull/123

ikousik commented 8 years ago

@szweier have tried but issue is not fixed.It's jumps with section 1 and 13 rows.

szweier commented 8 years ago

Which view are you picking from the demo?

szweier commented 8 years ago

@ikousik also, what simulator are you using, what OS.

szweier commented 8 years ago

I see it jumping for an iPhone 5. Sorry taking a look.

szweier commented 8 years ago

Looks like the issue is that when the frame changes it thinks it can fit the cells which then jumps back down. Not sure how to fix this one at the moment.

szweier commented 8 years ago

Yea sorry about that it looks like this fixes the alignment issue on other devices rather than specifying a frame but it doesn't address the issue you are seeing.

Sent from my iPhone

On Feb 23, 2016, at 1:58 PM, 200 Ok notifications@github.com wrote:

@szweier have tried but issue is not fixed.It's jumps with section 1 and 13 rows.

— Reply to this email directly or view it on GitHub.

szweier commented 8 years ago

@mazyod my PR fixed one part of this issue but not the entire problem. It looks like there's a deeper issue with adjusting the frame resulting in the jumping.

ikousik commented 8 years ago

@szweier @Mazyod I have uploaded one video in youtube please look into this.Video.

Xcode version - Version 7.2.1 (7C1002), iOS version : 9.2 Issue is coming If Section is 1 and no of row is 11 for iPhone 4s, 13 for iPhone 5 and 15 for iPhone 6

szweier commented 8 years ago

Yea this seems to be happening when the table view frame becomes large enough to fit the cells again. In my opinion it's an edge case but would still be interesting to find a solution for. Granted I'm new to this code base so I'm not sure where to start to find this one just yet.

ikousik commented 8 years ago

@szweier any update ?

ikousik commented 8 years ago

@Mazyod issue is not fixed. why did u close the issue?