I am setting a tag for my navigationBar using:
self.navigationController.navigationBar.tag = 1;
When you select a cell and the child UITableView loads, I set:
self.navigationContr开发者_JAVA百科oller.navigationBar.tag = 2;
But when I hit the 'back' button and the Parent UITableView appears again, the .tag is still set to 2.
I have tried setting tag=1 in the Parent's viewDidLoad, viewWillAppear, viewDidAppear and in the Child's viewWillDisappear - any help would be greatly appreciated.
As a rule of thumb, only use .tag properties on non-system UIView classes. You might be better off mapping these navbars in an NSMutableArray.
精彩评论