Open notDanish opened 8 years ago
@notDanish Before trying to dig into this, can you try this "hail Mary" attempt:
[self.tableView setContentOffset:CGPointMake(1,1) animated:YES];
@Mazyod Tried, it still has the same issue.
CGPointMake(0,0)
CGPointZero
CGPointMake(1,1)
all working the same way. For some reason I see the tableView frame as :(0, -44, width, height) instead of what i'd hope to be :(0, 0, width, height) when I log after the code.
@notDanish Can you please tell me more about your shyNavBar configuration? Sticky, extension height, ... etc?
@Mazyod Nothing fancy at all. Just that one line of code
self.shyNavBarManager.scrollView = self.tableView;
Haven't changed any other setting.
@notDanish Thanks, I'll try to look into it, nothing immediately comes to mind.. (Please note UITableViewController
is not supported)
I have the same problem. In some views I use extensionView, and some don't. None of them are scrolling to top correctly. The problem can be seen in your own swift sample demo code as well.
Thanks @oyalhi, I figured it would be easily reproducible
@Mazyod Also I noticed the scroll to top on tapping status bar feature which I believe is native to iOS 9 is not working anymore since I started using TLYShyNavBar. Is this a known issue?
@notDanish no, I believe it was fixed in the past, but it may have regressed
@Mazyod Can you direct me to the fix or the issue please?
@notDanish sure, this is the one I had in mind #82
@Mazyod I checked the commit you made for that issue. It is not really affecting in this issue. On tapping the status bar, the scrollView (tableView here) doesn't scroll to top and hence the method - (void)scrollViewDidScrollToTop:(UIScrollView *)scrollView
isn't called.
Do you know if the touch event on status bar is being overridden by TLYShyNavBar or something weird like that?
Hi @Mazyod Was wondering if you had any update? Thanks a lot!
@notDanish Yeah, sorry about that. There is no specific way the library overrides the status bar touch behavior. However, the status bar is coupled with the scroll view on this, since a touch on the status bar leads to an event on the scroll view. The library heavily manages the scroll view, so maybe something missing on that front.
I am currently in "management" mode, will be happy to answer questions and review PRs, but can't really dig into the code. Will try to allocate more time soon.
While I wouldn't call it particularly critical, I'm seeing this issue as well - using setContentOffset
to scroll a scrollView up to the top programmatically doesn't fully work. I recorded a quick video to show the behavior I'm seeing (tapping the tab bar should scroll everything to 0,0
, but as you can see, it stops a bit short): https://www.dropbox.com/s/5j5es7wburff5n8/scrolling.mov?dl=0
very interesting demo @worthbak, thanks for taking the time. I think there is some resistance the library might be applying, and maybe we can take care of it using the middleMan
by listening to the scroll to top ...
I'm having this issue also, except I'm not actually calling setContentOffset...I only have two lines of code:
self.shyNavBarManager.scrollView = self.tableView;
self.shyNavBarManager.extensionView = myOtherView
Without even touching the scrollview, the application starts and isn't scrolled all the way up just as shown in @worthbak's video.
EDIT: I suppose the issue I'm having is #101, which might be related to this one after all.
i' m having an issue in iphone 4s. when i have less number of cells in uitableview then navigation bar is behaving unexpectedly while scrolling.
scenario: Use i phone 4s number of cells = 11 height is default tableview height
@notDanish tapping the status bar seems to work fine for me when using the shyNavBarManager. I did however see this issue before for a different reason that may apply to your situation. Basically if any other views exist on that tableview the can "scroll to top" it will negate the scrolling to top capability. You'd need to setScrollsToTop to NO. So if a cell has a UITextView, UIScrollView etc. it will break scroll to top on the table view. Hope that helps.
For anyone still having this issue, use self.tableView.scrollRectToVisible(CGRect(x:0, y:0, width:1, height:1), animated: true)
instead of setContentOffset:
. The scrollview will scroll to the top and maintain the correct layout with extensionViews and the NavigationBar.
I'm using this line of code :
[self.tableView setContentOffset:CGPointMake(0,0) animated:YES];
for my tableView that is present in a viewController embedded in shyNavBar.The code was working perfectly till I changed the nav bar to shyNavBar. Now it doesn't scroll completely to top. The top of the first cell seems to get cut off a little until i manually scroll it down.
Is the shyNavBar somehow interfering with the scroll of the tableView?