Skip to content
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

bugFix: two gray line appear when device rotate from horizontal regular to horizontal compact #14

Closed
wants to merge 6 commits into from

Conversation

zhongwuzw
Copy link
Contributor

bug reproduce:

  1. let device in horizontal regular state;
  2. search some key(ps. has search results);
  3. rotate device to horizontal compact state; then appear two gray line.

…ar to horizontal compact

bug reproduce:
1. let device in horizontal regular state;
2. search some key(ps. has search results);
3. rotate device to horizontal compact state; then appear two gray line.
@zhongwuzw
Copy link
Contributor Author

screenshot:


635c804e241ae9497eff8f047d2fdf04

  • I think it's a iOS system bug.

@Kapeli
Copy link
Owner

Kapeli commented Nov 16, 2016

I still get a gray line with your fix:

simulator screen shot 16 nov 2016 12 35 42

I've seen these bugs in all iOS apps I've tried when rotating between portait/landscape or landscape/portrait, including Apple apps. The gray lines aren't the only issue, the whole search results table view seems to reposition.

Maybe we should fix it by ending the search and redoing it on rotation?

…ar to horizontal compact

bugFix: two gray line appear when device rotate from horizontal regular
to horizontal compact
@zhongwuzw
Copy link
Contributor Author

@Kapeli I updated the code, this time, I don`t remove top gray line, just adjust tableView insets.

…ar to horizontal compact

bugFix: two gray line appear when device rotate from horizontal regular
to horizontal compact
@Kapeli
Copy link
Owner

Kapeli commented Nov 17, 2016

This fixes the tableview part of the bug, but the searchbar doesn't reposition properly, so you still get something like this when switching from landscape to portrait:

6397d3e4-abf9-11e6-915d-b1c650f59529

Deactivating & reactivating the search controller seems to fix all bugs, but it's ugly as it loses scroll position and redoes the search: ee49a6e. I don't really like it.

I'll try to expand on your fix and get the searchbar to reposition properly.

@zhongwuzw
Copy link
Contributor Author

zhongwuzw commented Nov 17, 2016

@Kapeli , yeah, I agree with you, deactivating & reactivating seems not user friendly. If wants to position searchBar under statusBar, I think we can add code self.edgesForExtendedLayout = UIRectEdgeNone; to viewController.I'll try it later.

@Kapeli
Copy link
Owner

Kapeli commented Nov 17, 2016

self.edgesForExtendedLayout = UIRectEdgeNone changes the way the status bar is drawn. Doesn't look good in my opinion.

simulator screen shot 17 nov 2016 20 38 06

Found these radars regarding this issue: https://openradar.appspot.com/21743785 and https://openradar.appspot.com/352525

reproduce step:
1. go into download docsets interface.
2. let searchBar into active state.
3. rotate device from horizontal regular to horizontal compact or vice
versa.
…ar to horizontal compact

bugFix: two gray line appear when device rotate from horizontal regular
to horizontal compact
@zhongwuzw
Copy link
Contributor Author

@Kapeli , I changes the statusBar color by set DHSplitViewController backgroundColor. because of set self.edgesForExtendedLayout = UIRectEdgeNone, we should revise DHNavigationAnimator.

I also fix the docset download interface bug(reproduce step: in download interface,click searchBar,rotate,input some search key). screenshot below:
2016-11-19 12 00 34

@Kapeli
Copy link
Owner

Kapeli commented Nov 18, 2016

I think this is going to extreme lengths to partially fix a bug that's on Apple's end. I'd much rather leave things as is and have the bug present like every other app on iOS. I'm afraid we'll introduce a bunch of other bugs trying to fix this one.

@zhongwuzw
Copy link
Contributor Author

Yep, I'll close the pull request.

@zhongwuzw zhongwuzw closed this Nov 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants