0

I've a problem ... and for the moment don't know how work it out...

The application has a tabbar view, all the ViewController on the TabBar has the same structure, with a leftBarButton with back action and with a rightBarButton with an specific feature.

I've all the design with the IB, and all the views has defined and linked with IBOutlets the UIBarButtons.

The TabBar has 9 views, and just in two doesn't work.

  • The first one has an standard search button ... but, I don't know why, is not visible when the view is visualized ... the same solution works in iphone ... is very strange
  • The second one has an Custom button which display an UIPopOver view ... I already have in the XIB ... but is not been showed when the view is displayed.7

I try to add programatically the button on viewDidLoad event, but sometimes is showed, sometimes not ...

Any suggestion?

Thanks!!

Iván Peralta
  • 851
  • 1
  • 9
  • 25

1 Answers1

0

After testing all the solutions without no progress ... I decided to discard the IB and create the UITabBarController programatically from scratch.

I did a iterative solution, including just one UINavigationController at the beginning and incrementally including the others eight.

I have initialized the UIViewControllers without any NIB ... for me surprise for some UIViewControllers I received the exception on the init method:

this class is not key value coding-compliant for the key ...

Usually it has raised when you use XIB and some Outlet is not linked ... to solve this bug I created an empty NIB with a ViewController with an empty View and initialized the UIViewControllers with this empty NIB.

if (self == [super initWithNibName:@"EmptyViewController" bundle:[NSBundle mainBundle]]){

In order of my problem ... programatically I received the same problem ... and the same views have the same problem and the rightBarButtonItem has disappeared again ...

Finally, the solution was change the order of the UIViewController on the UITabBar ... yes, it's impossible ... but trust me ... it was the only solution i found for the moment.

If anybody knows any other workaround ... let me know.

Thanks ....

Iván Peralta
  • 851
  • 1
  • 9
  • 25