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

Using with not preloaded data #143

Open todorovhristo opened 8 years ago

todorovhristo commented 8 years ago

Hi,

First of all I wan't to thank you for this great lib - it's really solid and pretty much awesome. What bothers me is that how to init the extension view when the data will be fetched from Network service. Right now I'm doing following:

       self.shyNavBarManager.scrollView = tableMain
       self.shyNavBarManager.extensionView = header//this is view I create earlier
       self.shyNavBarManager.stickyNavigationBar = true

       reloadData()//here make service call and then CollectionView.reloadData()

The problem is that extension view partially covers my first row. Scrolling works perfect and offset is not wrong, but this is not acceptable by the requestors.

See what I meant: http://prntscr.com/axxhts

And how it looks after I manually scroll it a little: http://prntscr.com/axxi9u

Any help will be highly appreciated.

mgiroux commented 8 years ago

having the same issue but here is a quick fix

Set your extensionView when you are data is ready, set your extensionView to nil and reset it again, then it will look ok