uinavigationcontroller

How to reload rootViewController in navigationController When press “back”?

泪湿孤枕 提交于 2020-01-07 02:31:07
问题 There are 2 viewControllers in a navigationController: navigationController->root->A In viewController A, if a user make some settings and press the left bar button item(Back), I want the root view to renew its layout(some views' size will be changed). By now, I make it works by adding one more navigationController between the two viewControllers(present modally): navigationController->root->navigationController->A. Is there a way to renew the root viewController with one navigationController

Pass data from plist based UITableView to UIViewController [duplicate]

十年热恋 提交于 2020-01-06 20:08:43
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: How to pass data to detail view after being selected in a table view? I have a TableViewController with a protoptype cell. It's populated with Labels and ImageViews from a .plist with an Array of Dictionaries. How can I pass this data to the detail View? The detail view is a UIViewController subclass. I've tried with methods from different tutorials but I just can't find the right combination to make it work.

Pass data from plist based UITableView to UIViewController [duplicate]

眉间皱痕 提交于 2020-01-06 20:07:55
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: How to pass data to detail view after being selected in a table view? I have a TableViewController with a protoptype cell. It's populated with Labels and ImageViews from a .plist with an Array of Dictionaries. How can I pass this data to the detail View? The detail view is a UIViewController subclass. I've tried with methods from different tutorials but I just can't find the right combination to make it work.

UINavigationItem setHidesBackButton:YES won't prevent from going back

时间秒杀一切 提交于 2020-01-06 16:46:16
问题 It's odd, I know, but even if you stated hidesBackButton to YES for the UINavigationItem associated with your view, you will be able to go back just touching the area that was meant to be a back button. Sharing my solution... (more to come) 回答1: First I thought it was a simulator bug and uploaded to the device. But when I reproduced the same behavior there as well I started to think how to get rid of such behavior (since it was essential for me). Came up to such a solution: [self

UINavigationItem setHidesBackButton:YES won't prevent from going back

别等时光非礼了梦想. 提交于 2020-01-06 16:43:32
问题 It's odd, I know, but even if you stated hidesBackButton to YES for the UINavigationItem associated with your view, you will be able to go back just touching the area that was meant to be a back button. Sharing my solution... (more to come) 回答1: First I thought it was a simulator bug and uploaded to the device. But when I reproduced the same behavior there as well I started to think how to get rid of such behavior (since it was essential for me). Came up to such a solution: [self

Hiding a UINavigationController on start page

会有一股神秘感。 提交于 2020-01-06 13:57:51
问题 Hi I have a navigationController that starts with a view controller in which in viewDidLoad has: self.navigationController.navigationBarHidden = YES; I click a button on that page and it transitions to a second view controller in which I put: self.navigationController.navigationBarHidden = NO; This works fine until I click the Back button in the navigation bar. How do I keep the navigation bar permanently off the start page but not the transitioned one? 回答1: Add self.navigationController

Using pushViewController: animated:

℡╲_俬逩灬. 提交于 2020-01-06 07:08:23
问题 I'm trying to use the pushViewController: animated: with a UIViewController. I have it housed in a UINavigationController with initWithRoot and it still doesn't work. Here is my code? Am I doing something wrong? CloudappSettingsViewController *cloud = [[CloudappSettingsViewController alloc] initWithNibName:nil bundle:nil]; UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:cloud]; [self pushViewController:nav animated:YES]; [cloud release]; It always

How to swap between 2 root view controllers

两盒软妹~` 提交于 2020-01-06 05:49:30
问题 I have a game with two rootViewControllers - one for the Menu and the other for the Game itself. When the user switches between the Game and the Menu, I want to switch the rootViewController. Ultimately my questions is, what is the best way to do this? Or is there another approach for switching stacks that makes more sense than having 2 rootViewControllers? As it stands, I have an instance of a navigationController in my appDelegate. When I want to switch rootViewController, I initialise a

UINavigationControllers: How to pass value to higher (parent?) controller in stack?

。_饼干妹妹 提交于 2020-01-06 05:30:09
问题 I have SendingController which push to nav stack SendingDeatilsController (which one has a TableView). User should should pick in TableView one row (it checked by Checkmark) and I would like to pass the value of this row (let it will NSString object) to the SendingController. How can I realize this behaviour in my application? And is SendingController parent for SendingDetailController (attribute parentController of SDC refers to SC) ?? 回答1: If you want to implement this behaviour, pass the

Best point to overwrite the navigationBar property of navigationController

*爱你&永不变心* 提交于 2020-01-06 04:54:29
问题 I'm overwriting UINavigationController to replace the default navigationBar property with an instance of my own subclass of UINavigationBar . So I tried something like _navigationBar = [[SBNavigationBar alloc] init]; in my -initWithRootViewController: . But that didn't work out as I expected it. There's still the default navigationBar being displayed. So what's the best point to overwrite the navigationBar ? Thanks in advance –f 回答1: If you check the documentation http://developer.apple.com