SlackTextViewController
SlackTextViewController copied to clipboard
Views added to self.view do not appear underneath navigation bar
Description
If you add a view to self.view
and position it underneath the navigation bar, it should appear blurred underneath, as the nav bar is translucent. For some reason when using SlackTextViewController, it is not, it's as if there's nothing else underneath it.
Reproducible in:
SlackTextViewController version: 1.9.5 iOS version(s): 10.1 and 10.2 beta, possibly earlier versions Device(s): iOS Simulator, iPhone 7
Steps to reproduce:
- Download the repo
- Open the example Messenger workspace
- Open MessageViewController.m
- Add the following code in
viewDidAppear
:
UIView *v = [[UIView alloc] initWithFrame:CGRectMake(0, -100, 320, 200)];
v.backgroundColor = [UIColor redColor];
[self.view addSubview:v];
- Run the Messenger-Programmatic target
Expected result:
A big red area should appear blurred behind the navigation bar
Actual result:
Red doesn't appear in the navigation bar despite the fact it is placed directly below it and the navigation bar is translucent
Attachments:
If you click the arrow button at the top right, it appears as expected.
I have the same issue/question
+1
Very interesting observation! I was able to reproduce this, by adding that code snippet either in viewDidLoad
and viewDidAppear
. @hipwelljo did you end up finding the issue?
I would have though the edgesForExtendedLayout
wasn't all
. That would have explained it, but it's all
by default and playing around with it doesn't help much.
extendedLayoutIncludesOpaqueBars
is set to YES
internally in SLKTextViewController
but this flag doesn't influence the translucency of the navigation bar.
I have sincerely no idea why this could be happening.
No I wasn't able to figure out why. I would still like it to be solved though. :)