Friend-LGA / LGRefreshView

iOS pull to refresh for UIScrollView, UITableView and UICollectionView
MIT License
154 stars 31 forks source link

Autolayout & Interface Builder #4

Open alvinmeimoun opened 8 years ago

alvinmeimoun commented 8 years ago

Hi,

I implemented the library following this code refreshView = LGRefreshView(scrollView: self.tableView, delegate: self)

And my tableview is built in a xib file

capture d ecran 2016-08-09 a 18 42 54

But the loading indicator is not centered, i think it's centered from interface builder with instead of real runtime width (i already encoutered this bug/feature ? on iOS development and didn't found any nice solution).

So my app is rendering like that i-and i don't know how to align center horizontal the loading indicator

capture d ecran 2016-08-09 a 18 41 00 1 capture d ecran 2016-08-09 a 18 41 13
alvinmeimoun commented 8 years ago

I forgot to mention that my tableview is builded in a xib file that be loaded as a subview of a custom UIView

I found an alternative to be unstuck, i deleted my xib and coded my tableview from code and added constraint manually, it works perfectly.

I didn't close the issue because i think we need more test with xib , and i think it's not a library bug but a bad usage and if i find something i will make a pull request for the sample app or readme.md to cover this case