开发者

How to truncate the content of back button in UINavigationController?

I need to truncate the string content of back button of navigation controller. Let me 开发者_高级运维explain clearly. I have large title in First view controller, same name is appearing in the next view controller while navigating in a back button. So much space is occupied by back button, I could not able to set the title clearly in next view controller.

How can I truncate the content of Back Button. Please help me out of this.

Thanks, Madan Mohan


You could try setting a custom back button for the first view controller, with the truncated title.

[self.navigationItem setTitle:@"A really long title"];

UIBarButtonItem * newBackButton = [[UIBarButtonItem alloc] initWithTitle:@"A really.." style:UIBarButtonItemStyleBordered target:nil action:nil];
[self.navigationItem setBackBarButtonItem:newBackButton];
[newBackButton release];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜