1

When designing in Interface Builder and you add text to a prompt property, it creates an additional top title. This comes with the extra thickness needed to allow for 2 tiles in the navigation bar.

Once I remove the text, let's say to reset back to the way it was, it keeps that thickness even though there is no text there. At runtime switching views makes the bar grow and shrink, which isnot nice.

My question is, how do you reset this back to a default single line thickness bar?

Thank you Jim

yuji
  • 16,695
  • 4
  • 63
  • 64
Jim
  • 21
  • 4
  • This seems to be a bug in IB. – Deepak Danduprolu Jun 21 '11 at 03:08
  • 1
    I was hoping it wasn't...went to log a bug with apple and got another bug .. :) "An error has occurred. Please report the error to Apple Inc. by emailing the error detail to devbugs@apple.com." – Jim Jun 21 '11 at 03:15
  • 2
    A workaround, if this is a bug is to edit the *.xib file...as xml you can delete the entry and seems to reset without issue...(take usual backup & care & risk ofcourse) – Jim Jun 21 '11 at 04:22
  • Probably you should add this as an answer? – Deepak Danduprolu Jun 21 '11 at 04:25
  • will do ..have to wait 8 hours as I don't have enough kudos points ...cheers – Jim Jun 21 '11 at 06:16

2 Answers2

1

In case anyone else has this problem...2 options

1 Fix unremoved xml in xib direct

A workaround, if this is a bug is to edit the *.xib file...as xml you can delete the entry left behind and seems to reset without issue...

e.g. To be sure, add value like "FOO BAR" and search for that in the text editor to find the key.

(take usual backup & care & own risk ofcourse)

(submitted online bug to apple for assessment)

2 Runtime programatic fix suggested by Drew C i.e. set self.navigationItem.prompt = nil

Jim
  • 21
  • 4
0

In the Attributes Inspector pane of IB, change the value for Top Bar to "Navigation Bar" instead of "Navigatin Bar with Prompt"

Edit: See photo below- enter image description here

Drew C
  • 6,408
  • 3
  • 39
  • 50
  • Hi Drew, thanks for the response but I'm not getting that option in(Xcode4)...am I missing something? – Jim Jun 21 '11 at 06:27
  • See the screenshot I added. You should also be able to set self.navigationItem.prompt = nil in your view controller code to achieve the same result. – Drew C Jun 21 '11 at 18:18