reskin: Improve a bit RoomVC expanded header display

RoomVC is displayed in another UINavigationController. Its bar can be translucent. Then, we just need to make sure that the main UINavigationController navigationBar is translucent when displaying the expanded header.

Note: there is a UI glitch when navigating back when the expanded header is displayed but that bug existed before (in v0.7.8)
This commit is contained in:
manuroe
2018-12-28 17:52:45 +01:00
parent e6862e0d15
commit 0a0279e8b6
+2 -6
View File
@@ -419,6 +419,7 @@
- (void)userInterfaceThemeDidChange
{
[RiotDesignValues applyStyleOnNavigationBar:self.navigationController.navigationBar];
self.navigationController.navigationBar.translucent = YES;
self.activityIndicator.backgroundColor = kRiotOverlayColor;
@@ -1483,12 +1484,6 @@
- (void)showExpandedHeader:(BOOL)isVisible
{
// Use a transparent navigation bar when displaying the expanded header
// Retrieve the main navigation controller if the current view controller
// is embedded inside a split view controlle
self.navigationController.navigationBar.translucent = isVisible;
self.mxk_mainNavigationController.navigationBar.translucent = isVisible;
if (self.expandedHeaderContainer.isHidden == isVisible)
{
// Check conditions before making the expanded room header visible.
@@ -1549,6 +1544,7 @@
// Report shadow image
[mainNavigationController.navigationBar setShadowImage:shadowImage];
[mainNavigationController.navigationBar setBackgroundImage:shadowImage forBarMetrics:UIBarMetricsDefault];
mainNavigationController.navigationBar.translucent = isVisible;
[UIView animateWithDuration:0.3 delay:0 options:UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionCurveEaseIn
animations:^{