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!


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

[barButton release];  
[activityIndicator startAnimating];  

This should work. From:

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#.