I have 2 UIViewController
. I have just done a simple task.
Move from first view controller to second view controller.
First View Controller's Name : "My Information"
Issue is when I reach to the 2nd View Controller then I found back button title as "Back"
When I turn the simulator to landscape view then back button title is as "My Information"
What is the issue there? I could not understand.
This is probably because the title is too long. Try setting it to a shorter string, or set your own custom back button.
In "My Information" view controller add below code.
1) In viewWillAppear:(BOOL)animated
-(void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
self.navigationItem.backBarButtonItem =
[[UIBarButtonItem alloc] initWithTitle:@"Back"
style: UIBarButtonItemStylePlain
target:nil
action:nil];
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.