-
Notifications
You must be signed in to change notification settings - Fork 104
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
Maintenance: Internal rework related to searchbar #1044
Conversation
bc5d193
to
639aea7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- will check current master no my side now, maybe will figure out what's up with the indicators
- the PR is probably fine, but that "useless" inactive searchbar is a very strange workaround...
- please resolve conflicts
Thanks for looking into this. I am lost and have no idea how to resolve this. |
0a6eacb
to
c53d9c8
Compare
what I see is that my suspicion is that view hierarchy is involved, specifically view controller hierarchy. If you open View Debugger, you can see that |
ECSlidingViewController is not involved on iPad, where the scroll indicator is also missing. For iPad there is another (old) controller involved: StackScrollViewController. I also now looked into the View Debugger and can see DetailViewController. It is found in InitialSlidingViewController > UIView > CustomNavigationController > UILayoutContainerView > UINavigationTransitionView > UIViewControllerWrapperView. https://ibb.co/wrCdr19 One more detail: When running in iOS 15.5 simulator both horizontal and vertical scroll indicators are present. When running in iOS 17 simulator only the horizontal one is there. |
oh wow, seems I was looking at the wrong place :) will double-check |
For the issue itself it did not matter though. The same issue is also happening for the table which you were looking at (the main menu). We should better move our discussion on the scroll indicators to #1007. |
At least it explains why my hacks Don didn't seem to have any effect |
Even when not directly adding
Is there possibly something very basic wrong or not yet configured right related to window / scene? |
c53d9c8
to
1691f38
Compare
don't think it has any relation to window / scene found a hacky workaround: just add this to dispatch_async(dispatch_get_main_queue(), ^{
dataList.showsVerticalScrollIndicator = YES;
}); |
XBMC Remote/DetailViewController.m
Outdated
} | ||
} | ||
|
||
- (void)openSearchBar { | ||
showbar = YES; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please also rename this ivar to showBar
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, named it showSearchbar
.
Cool, works! :) |
fully agree, very good idea |
Good. Will create a separate PR in next 30 mins. We can then either close the related issue with this, or keep it open for a real fix. You have any clue what is going wrong? |
Only create self.searchController once in viewDidLoad. self.searchController is the UISearchController which is used for an active search and always displayed detached (floating on top of list). To activate a search a dedicated UISearchController + transparent overlayed UIView is created for list view and collection view each. The overlay has a UITapGestureRecognizer which triggers a method to show and activate the central self.searchController. This allows keep the same look of the searchbar. Only create the inactive searchbar + overlay once for list view and once for collection view in viewDidLoad. Some refactoring to be able to unify the look of the inactive searchbar (the one with the overlay) and the active self.searchController
b34a487
to
257130b
Compare
Squashed, proper commit message and rebased to master. |
absolutely no clue and don't really wish to spend any more time on that. Let's close the issue using the found workaround. |
Description
relates to #1042
Background:
The current implementation is not optimal and shows some unpredictable behaviour. Some of the current seen issues are caused by iOS17 (missing scroll indicator when adding a searchbar as
UITableView's
tableHeaderView
, or too wide searchbars).But there are general flaws in the implementation like re-creating the searchbar with each switch between list view and collection view, removing and adding searchbar from views multiple times. I prepared a change which reworks this but has a few workarounds which I would like to have 2nd opinion on.
Premises / Constraints:
UITableView's
tableHeaderView
must be aUISearchBar
to handle insets gentlyChanges:
self.searchController
once inviewDidLoad
self.searchController
is theUISearchController
which is used for an active search and always displayed detached (floating on top of list)UISearchController
+ transparent overlayedUIView
is created for list view and collection view each. The overlay has aUITapGestureRecognizer
which triggers a method to show and activate the centralself.searchController
. This allows keep the same look of the searchbar.viewDidLoad
self.searchController
Summary for release notes
Maintenance: Internal rework related to searchbar