SlackTextViewController icon indicating copy to clipboard operation
SlackTextViewController copied to clipboard

Views added to self.view do not appear underneath navigation bar

Open hipwelljo opened this issue 8 years ago • 5 comments

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:

  1. Download the repo
  2. Open the example Messenger workspace
  3. Open MessageViewController.m
  4. Add the following code in viewDidAppear:
UIView *v = [[UIView alloc] initWithFrame:CGRectMake(0, -100, 320, 200)];
v.backgroundColor = [UIColor redColor];
[self.view addSubview:v];
  1. 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:

app view hierarchy

hipwelljo avatar Dec 03 '16 00:12 hipwelljo

If you click the arrow button at the top right, it appears as expected.

simulator screen shot dec 2 2016 7 53 09 pm

hipwelljo avatar Dec 03 '16 02:12 hipwelljo

I have the same issue/question

danipralea avatar Dec 07 '16 02:12 danipralea

+1

stremblayiOS avatar Feb 06 '17 20:02 stremblayiOS

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.

dzenbot avatar Mar 01 '17 06:03 dzenbot

No I wasn't able to figure out why. I would still like it to be solved though. :)

hipwelljo avatar Mar 01 '17 07:03 hipwelljo