Pages

Tuesday, 16 December 2014

How to add activity indicator in ios



1] Add Activity Indicator View Control in your xib (view) (i mean where you want)
    (you can choose from object library in Xcode project)

2]  then make property and synthesise for it ( And don't forget to assign the control to that property)

like
in .h

@property (strong, nonatomic) IBOutlet UIActivityIndicatorView *MyActivityIndicator;


and

.m

@synthesize MyActivityIndicator;




3]  

A) to start animating these control 

   [MyActivityIndicator startAnimating];

B) to stop animating these control

   [MyActivityIndicator stopAnimating];


C) to hide these control

    MyActivityIndicator.hidden=YES;

C) to show  these control

    MyActivityIndicator.hidden=NO;




-Arjun Taval

No comments:

Post a Comment