Improvement: Frosted glass navbar on iPhone#1479
Conversation
|
Initial PR only covers the library views. More work is required to let other views like server list or custom button view handle this as desired (= scroll view extending underneath the navbar) as well. |
| [appearance configureWithOpaqueBackground]; | ||
| [appearance configureWithTransparentBackground]; |
There was a problem hiding this comment.
severity: minor
category: correctnessRedundant configureWithOpaqueBackground call
[MINOR] The call to configureWithOpaqueBackground on line 115 is immediately overridden by configureWithTransparentBackground on line 116. The first call has no effect and should be removed. suggestion [appearance configureWithTransparentBackground];
| moreItemsViewController.tableView.contentInset = activeLayoutView.contentInset; | ||
| [self setViewInset:moreItemsViewController.tableView bottom:buttonsViewBgToolbar.frame.size.height]; | ||
| [moreItemsViewController.tableView setContentOffset:CGPointMake(0, -moreItemsViewController.tableView.contentInset.top) animated:NO]; |
There was a problem hiding this comment.
severity: medium
category: correctnessRedundant configureWithOpaqueBackground call
[MEDIUM] The refactored code sets contentInset but no longer sets scrollIndicatorInsets. When content extends under translucent bars, the scroll indicator needs matching insets to avoid being partially obscured by the navigation bar or toolbar. The removed code explicitly set both: objc moreItemsViewController.tableView.scrollIndicatorInsets = tableViewInsets; This should be added after line 1063: suggestion moreItemsViewController.tableView.contentInset = activeLayoutView.contentInset; [self setViewInset:moreItemsViewController.tableView bottom:buttonsViewBgToolbar.frame.size.height]; moreItemsViewController.tableView.scrollIndicatorInsets = moreItemsViewController.tableView.contentInset; [moreItemsViewController.tableView setContentOffset:CGPointMake(0, -moreItemsViewController.tableView.contentInset.top) animated:NO];
| UIEdgeInsets viewInsets = dataList.contentInset; | ||
| viewInsets.top = [self getTableInsetTop]; | ||
| dataList.contentInset = viewInsets; |
There was a problem hiding this comment.
severity: medium
category: correctnessRedundant configureWithOpaqueBackground call
[MEDIUM] When setting contentInset.top to extend content under the navigation bar, scrollIndicatorInsets should also be set to prevent the scroll indicator from being drawn underneath the navbar. The existing setViewInset:bottom: method at DetailViewController.m:860-865 demonstrates this pattern (sets both contentInset and scrollIndicatorInsets), but it's not used here. suggestion UIEdgeInsets viewInsets = dataList.contentInset; viewInsets.top = [self getTableInsetTop]; dataList.contentInset = viewInsets; dataList.scrollIndicatorInsets = viewInsets;
65d5f3e to
23d3969
Compare
Make navbar transparent and add the desired blur effect. Let the table view and the collection view extend underneath the navbar and set the inset accordingly.
23d3969 to
e45d11a
Compare
Description
Frosted Glass Effect
Use frosted glass effect (
[UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]) for navbar. Let the table views extend underneath the frosted glass and adaptcontentInsetaccordingly.Special care is needed for the following areas:
SVPullToRefreshworking as expected it is important to explicitly setcontentInsetinstead of automatic adjustment.buttonsViewEffectwhile being in fullscreen library view.Screenshots
Screenshots (left = current, right = dark blur): https://ibb.co/zW9r4NRv
Video: link to video
Summary for release notes
Improvement: Frosted glass navbar on iPhone