Hrushikesh Betai
Hrushikesh Betai

Reputation: 2217

how to add activity indicator when address book name is selected in my application?

i have a task to develop application with address book.

i have to develop the app to select name,photo,email,hompage,address from address book.when i select the record it take long time to add record.i want to add activity indicator when user select the record in address book table.

Please provide me some source for it.and help me please as fast as possible.

Upvotes: 0

Views: 123

Answers (2)

smile.al.d.way
smile.al.d.way

Reputation: 361

Try this -

[[[UIApplication sharedApplication] keyWindow] addSubview:self.activityIndicator];

and then

[self.activityIndicator startAnimating];

where activityIndicator is declared in .h file like -

@property(nonatomic,retain) UIActivityIndicatorView *activityIndicator;

and synthesized in .m file -

@synthesize activityIndicator;

Upvotes: 1

iamsult
iamsult

Reputation: 1579

This will do // declare and synthesize the object UIActivityIndicatorView *activityIndicator; @property (nonatomic, retain) IBOutlet UIActivityIndicatorView *activityIndicator;

// on event function write this code

[activityIndicator startAnimating];

Upvotes: 0

Related Questions