Dynamic title like in the Notes app
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
精彩评论