开发者

How add back button into navigation bar?

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜