0

I have inserted some view in titleView which is in navigationItem like this self.navigationItem.titleView=someView; after this i set it as nil self.navigationItem.titleView=nil; then after this i can't set title in navigationItem as [self.navigationItem setTitle:@"Title"];.

so how can i set title for navigationItem.give me some idea.

Thanks

Jeeva
  • 101
  • 1
  • 5
  • can you show more code. What's happening behind the button. Where are you setting it back to nil? Are you doing this on main thread? – zakishaheen Oct 21 '11 at 18:31

1 Answers1

0

I think you have the right idea. According to the docs, setting the titleView to nil should make the title text appear. I would bet your issue is when in the lifecycle you do that. I believe adding that code in viewWillAppear would be fine.

Ken Pespisa
  • 21,989
  • 3
  • 55
  • 63
  • after when the page did appear i showing title only .In that page i placed text field and button.when we press that button then i sending the content which is typed in text field to server using rest full web service.During sending time i showed progress bar in the title view of navigation item.so when posting completed then i want to show title again but i cant.how to show title. – Jeeva Oct 21 '11 at 16:09
  • Ok, I understand. Have you tried calling `SetNeedsDisplay` on the navigationItem? – Ken Pespisa Oct 21 '11 at 18:28