uinavigationcontroller

Releasing ViewControllers form memory inside a UINavigationController

ⅰ亾dé卋堺 提交于 2019-12-25 02:30:06
问题 I'm building an app using a UINavigationController . I have a ViewController that shows some content, and when it receives interaction from the user (tapping a button for example) a new ViewController is displayed. Here is the code: FirstViewController.m -(IBAction)goToSecondVC:(id)sender{ SecondViewController *secondVC = [[SecondViewController alloc] init]; [self.navigationController pushViewController: secondVC]; } I want to release FirstViewController from memory once SecondViewController

UINavigationController subclass won't set titleView on load

本秂侑毒 提交于 2019-12-25 02:28:43
问题 I've just created a simple subclass of UINavigationController . #import "TTNavigationController.h" @implementation TTNavigationController - (void)viewDidLoad { [super viewDidLoad]; UIImage *logo = [UIImage imageNamed:@"logo"]; UIImageView *logoView = [[UIImageView alloc] initWithImage:logo]; self.navigationItem.titleView = logoView; } But when I run the project the navigation bar has not the titleView with the logo. Otherwise if I try to move those 3 lines of code in viewDidLoad of my view

Button Questions in MonoTouch

丶灬走出姿态 提交于 2019-12-25 02:13:57
问题 I'm working with MonoTouch and I have come up with three questions around buttons that I'm hoping someone can help me with. I'm trying to change the "Back" button in the title bar. How do I do this? I've seen the thread posted here: How to change text on a back button. However, that doesn't work. I get the vibe that I'm not accessing the controller property. Currently, I receive a NullReferenceException when I attempt to set the button text in the ViewDidLoad method. Currently, I'm trying to

Using UITabBar without creating a project with UITabBarController

两盒软妹~` 提交于 2019-12-25 02:13:57
问题 I want to use a UITabBar in my project. I did not create a project that is uitabbar based. I was wondering how for only one page I would be able to use a UITabBar. I can add it to the page, but I would like to add it and use it on a file and not throughout the whole project. I would also like to not restart this project since I have a navigation based project template being used and would like to just add the UITabBar to a single page to go back and forth with two views. The flow of my

iOS 7: How to force navigation bar of UINavigationController to be laid out as if status bar is showing even when status bar is hidden

断了今生、忘了曾经 提交于 2019-12-25 02:03:02
问题 Is there a way to force the navigation bar of a UINavigationController to be laid out as if the status bar is showing even when the status bar is hidden? My motivation is to prevent the navigation bar for shifting when a navigation controller presents a view controller that returns YES for prefersStatusBarHidden. An example of this is when you look at an attached image in an email in the Gmail app. 来源: https://stackoverflow.com/questions/22586361/ios-7-how-to-force-navigation-bar-of

ios JASidePanels make the UINavigationController the centerViewController

夙愿已清 提交于 2019-12-25 01:53:50
问题 In my application I am using the JASidePanels libraries, everything is set and working using storyboards, but I would like to push from my center view to a detail view by clicking on a tableViewCell, and for that I am assuming I need a UINAvigationController, can I somehow make the centerViewController start from a UINavigationController? 回答1: You have to put an storyboard identifier to the Navigation Controller that embeds the main view controller you want to have as the center panel; then,

Getting iPhone app to display one of two different views

喜欢而已 提交于 2019-12-25 01:50:00
问题 I have a program where we are using a navigation controller and need the app to launch to one of two different views. Basically if certain info has previously been entered then we need the app to launch to view A, but if the info has never been entered then we need it to launch to view B. I am having difficulty getting this to work and am wondering what ways if any I could implement this. I am certain it needs to be done in the app delegate but I am not sure how. Thanks in advance! 回答1:

How can I display a view controller modally, using the parent's navigation controller?

不问归期 提交于 2019-12-25 01:45:49
问题 I'm implementing a UITabBar in the middle of my navigation stack without UITabBarController. The UITabBar is in the DetailViewController which delegate a portion of the screen to the view controller associated with the selected tab element. Inside one of view controller's thats displayed via tab bar selection, there's a UIButton which needs to display a view modally. I tried [self presentModalViewController:modalNavController animated:YES]; , but the new navigation bar was hidden underneath

iphone, ipad Navigationcontroller popToViewController not functioning

ⅰ亾dé卋堺 提交于 2019-12-25 01:43:54
问题 i implemented a navigation controller which has 10+ view.. here by swiping right in view am switching to the next view... swiping left will bring u the previous page. here i used poptoviewcontroller for go to prevous page. in each of every page it has a menu to switch over to desired view. after jumping to the particular view if we swiping left will brings previously visited view instead of this i just want to go the previous page as per the menu... here i used all the property of

How to add a border to swift navigationBar after removing it

爱⌒轻易说出口 提交于 2019-12-25 01:37:46
问题 I use: self.navigationController?.navigationBar.shadowImage = UIImage() to remove the border of a navigationBar earlier in my app but now I'm not sure to add the border back on a later screen. 回答1: To reset the navigationBar 's shadowImage to the default shadowImage do the following: self.navigationController?.navigationBar.shadowImage = UINavigationBar().shadowImage 来源: https://stackoverflow.com/questions/57401651/how-to-add-a-border-to-swift-navigationbar-after-removing-it