An activity indicator view is useful in many applications. Any ideas about how to add, activiate and dismiss an activity indicator view on iPhone?
All the methods fo
Using Storyboard-
Create-
Go to the header file and create an IBOutlet for the UIActivityIndicatorView-
@interface ViewController : UIViewController
@property (nonatomic,strong) IBOutlet UIActivityIndicatorView *activityIndicatorView;
@end
Establish the connection from the Outlets to the UIActivityIndicatorView.
Start:
Use the following code when you need to start the activity indicator using following code in your implementation file(.m)-
[self.activityIndicatorView startAnimating];
Stop:
Use the following code when you need to stop the activity indicator using following code in your implementation file(.m)-
[self.activityIndicatorView stopAnimating];