How to add activity indicator to navbar?

Hey, I want to display an activity indicator on the right corner of my navbar when my user changes selection in picker wheel. I have no idea how to add activity indicator there I am only able to add normal navbar buttons there. Any help? Thanks in advance!

Answers


UIActivityIndicatorView *activityIndicator =  
[[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(0, 0, 20, 20)];  
UIBarButtonItem *barButton = [[UIBarButtonItem alloc] 
                                         initWithCustomView:activityIndicator];  
[[self navigationItem] setRightBarButtonItem:barButton];  

[barButton release];  
[activityIndicator startAnimating];  

This should work. From: http://iphonedevelopertips.com/user-interface/adding-an-activity-indicator-spinner-to-navigation-bar.html


Need Your Help

third normal form and foreign keys

foreign-keys relational-database database-normalization 3nf

My database design is currently at stage 3NF. The issue that is of concern is the foreign keys and in some cases compound keys.

Algorithm for creating unique bingo faces

c# .net algorithm

Does anyone know of an algorithm that can generate unique bingo card faces? I'm looking to implement this algorithm in C#.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.