Hide ActivityIndicator and display Title in NavigationBar
i display an activityindicator like
CGRect frame = CGRectMake(0.0, 0.0, 25.0, 25.0);
loading = [[UIActivityIndicatorView alloc] initWithFrame:frame];
[loading startAnimating];
[loading sizeToFit];
loading.autoresizingMask = (UIViewAutoresizingFlexibleLeftMargin |
UIViewAutoresizingFlexibleRightMargin |
UIViewAutoresizingFlexibleTopMargin |
UIViewAutoresizingFl开发者_运维技巧exibleBottomMargin);
self.navigationItem.titleView = loading;
in my navigationbar on the top. And i call:
[loading stopAnimating];
to stop.
This works like it should, but after hiding the activity indicator i want to display a text (self.title = @"text";) and this is not working.
What do i miss? Thanks for your help!
Try setting the self.navigationItem.titleView
to nil and then set the title.
精彩评论