New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display issues in UITableViewController on iOS 10 #53
Comments
Can you please post a screenshot? |
Does this happen on a blank slate project with a simple table view controller? |
I will check this asap. So, you could not reproduce it I guess? |
To be honest I haven’t had time yet to check. But considering you are reporting this, shouldn’t be hard for you to do 🙂. |
I looked into this and will post a fix soon but I honestly believe this is an iOS bug. RMessage uses the layoutGuide properties of its superview for sizing its height. By default tableViews have the property automaticallyAdjustsScrollViewInsets set to true which tells any container views such as nav controllers to inset the tableview to start below the nav bar. The issue though is that the Navbar offsets the top layout guide of the the tableview downward by the size of the nav bar (64pts). So now the top of the top layout guide is at the bottom of the nav bar and the bottom of the top layout guide is 64pt below. RMessage uses the bottom of the top layout guide for sizing/spacing. Given that its in a place where its not expected (64pts below the nav) thats why it looks bigger as in your screenshot. |
Thanks for analysing the issue! I decided to use a different library (which also adds the banners to the UIWindow, so they always stay on screen). So you don't need to provide a fix just for me. |
Update 10.23.2018.17.20.50 : Ok.. It seems that the issue with RMessage not staying on top of the tableview is limited to before iOS 11 as well. On iOS 11 and up the tableView scrolls independently of RMessage. By the way.. Alternatively try displaying RMessage like this from the UITableViewController:
and RMessage will display on top of the UITableViewController. Then you can scroll the tableView and RMessage will stay on top. By default this isn't necessary but due to this issue with iOS 10 it's a workaround. |
Issue: UITableViewControllers in iOS versions below 11 offset the entire topLayoutGuide downward when the automaticallyAdjustsScrollViewInsets property is set (which it is by default). This causes the topLayoutGuide bottom which normally is located at the bottom of any top bars to now be offset (height of top bar) pts below the bottom of the bar. This is not expected behavior (most likely a bug) and causes RMessage to improperly size itself. This commit fixes the said issue by detecting the presence of the automaticallyAdjustsScrollViewInsets being set to true, iOS 10 running, and RMessage's superview being a scrollview. #53
Bugfix added to 2.x.x_develop branch. Please retest. |
I will test it tonight. With "... so they always stay on screen" I meant that they stay on screen when pushing or popping to another ViewController |
Cool. If RMessage is not picking the right view controllers view to add itself to use showNotificationInViewController:, you should be able to get it to stay behind. |
@svenniemann any update? |
Closing Issue.. |
Notifications are display below the Navigation Bar with empty space on top (that space should be behind the navigation bar I guess)
I use the Objective C version. So far this issue only appeared on iOS 10 in an UITableViewController. In UIViewController it works fine.
The text was updated successfully, but these errors were encountered: