SlackTextViewController icon indicating copy to clipboard operation
SlackTextViewController copied to clipboard

Cannot set title in navigation bar.

Open JosephShenton opened this issue 8 years ago • 2 comments

  • [x] I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • [x] I've read and agree to the Code of Conduct.
  • [x] I've searched for any related issues and avoided creating a duplicate issue.

Description

Cannot set title in navigation bar.

Reproducible in:

  • [x] This is reproducible in the sample project. SlackTextViewController version: latest iOS version(s): 10.3.3 Device(s): iPhone 7

Steps to reproduce:

  1. in the viewDidLoad set self.navigationItem.title = @"Title";
  2. Run
  3. You'll see no title.

Expected result:

Have the title as "Title"

Actual result:

It was blank.

Attachments:

None

JosephShenton avatar Jun 04 '17 06:06 JosephShenton

Try setting the title in viewWillAppear. It seems to work for me.

RathVong avatar Jul 29 '17 09:07 RathVong

Did you really test on the sample project? I cannot reproduce with your environment specs. Anyway, the best practice is to do self.title = @"title" since navigationItem may be nil at the point of assignment.

dzenbot avatar Sep 22 '17 17:09 dzenbot