开发者

How add back button into navigation bar?

开发者 https://www.devze.com 2023-03-20 02:53 出处:网络
I have code in which i have hide default navigation back开发者_运维技巧 button. now i want to add new button at that place. and when press button then open main view or first screen of project. how i

I have code in which i have hide default navigation back开发者_运维技巧 button. now i want to add new button at that place. and when press button then open main view or first screen of project. how i do that?


try this

UIBarButtonItem *customItem = [[UIBarButtonItem alloc] initWithImage:bttnImage style:UIBarButtonItemStylePlain target:self action:@selector(Back:)];
[self.navigationController setHidesBackButton:YES];
[self.navigationItem setLeftBarButtonItem: customItem];
[customItem release];

Hope it will work for you...

0

精彩评论

暂无评论...
验证码 换一张
取 消