First View Controller to Second View Controller to Move. First View Controller Name is Information. and Issue is when I reach to the Second View Controller then I found back button Name as Back. 1 When I turn the simulator to landscape view then back button title is as "Information" 2 What is the issue there? I could not understand.
Asked
Active
Viewed 89 times
0
-
Where do you set the name for the back button? – Shamas S Jun 01 '16 at 05:10
-
When you turn the simulator to landscape view then what it shows?? – Suraj Sukale Jun 01 '16 at 05:15
-
What is the name of your second view controller? If the name is too large, you might find that iOS will change the back button name to Back so that everything can fit. – Beau Nouvelle Jun 01 '16 at 05:16
-
4iOS shows "Back" when the actual title is too long to fit in the button. There is no issue. It's normal. – rmaddy Jun 01 '16 at 05:16
-
1Just turn the simulator to landscape view, if back button title is as "Information"... then there is no issue... your title is too long thats why it show Back instead of information – Suraj Sukale Jun 01 '16 at 05:20
2 Answers
0
UIBarButtonItem *btnBack = [[UIBarButtonItem alloc]
initWithTitle:@"Your Title Name"
style:UIBarButtonItemStyleBordered
target:self
action:@selector(OnClick_btnBack:)];
self.navigationItem.leftBarButtonItem = btnBack;

amagain
- 2,042
- 2
- 20
- 36
0
Write below line of code in first view controller.
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:self.navigationItem.backBarButtonItem.style target:nil action:nil];
}

rmaddy
- 314,917
- 42
- 532
- 579

Payal Maniyar
- 4,293
- 3
- 25
- 51