开发者

Dynamic title like in the Notes app

开发者 https://www.devze.com 2023-01-31 10:15 出处:网络
when the user enters text in a uitextview I would that the title of the navigation bar changed dynamically like it happens in the Notes a开发者_StackOverflow社区pp.

when the user enters text in a uitextview I would that the title of the navigation bar changed dynamically like it happens in the Notes a开发者_StackOverflow社区pp.

How can I achieve this?

I think a label is used, don't I?

Thanks

Fran

EDIT: I know how change the title of a navigation bar, but how do this in a such way that the textview is tied to the title, so while user enters the first line of text in the same moment the title changes (letter by letter)?


UINavigationItem *navItem;
navItem = [UINavigationItem alloc];
navItem.titleView = lblTitle;
[navBar pushNavigationItem:navItem animated:false];
[navBar setDelegate:self]; 

Got this info from: http://www.iphonedevsdk.com/forum/iphone-sdk-development/7015-set-title-uinavigationbar.html


I know you can set the title of a navigation controller from within a child view controller simply via:

[self setTitle:@"Required title"];

or

[[self NavigationController] setTitle = @"Required title"];

However, these may not work interactively. (Not at a Mac OS X box otherwise I'd try it out.)


The answer to my question is here

0

精彩评论

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