UIActivityIndicatorView indicator provided by ios
//
// RootViewController. m
// UIActivityIndicatorViewDemo
//
// Created by Dubai on 15/4/28.
// Copyright (c) 2015 Dubai. All rights reserved.
//
# Import "RootViewController. h"
@ Interface RootViewController ()
@ Property (strong, nonatomic) UIActivityIndicatorView * activityIndicator;
@ End
@ Implementation RootViewController
-(Void) viewDidLoad {
[Super viewDidLoad];
// Do any additional setup after loading the view.
Self. view. backgroundColor = [UIColor whiteColor];
Self. activityIndicator = [[UIActivityIndicatorView alloc] initWithFrame: CGRectMake (100,100, 60, 60)];
[Self. view addSubview: self. activityIndicator];
Self. activityIndicator. activityIndicatorViewStyle = UIActivityIndicatorViewStyleGray;
[Self. activityIndicator startAnimating];
[NSTimer scheduledTimerWithTimeInterval: 3.0f target: self selector: @ selector (timerStop) userInfo: nil repeats: YES];
}
-(Void) timerStop
{
[Self. activityIndicator stopAnimating];
}
-(Void) didReceiveMemoryWarning {
[Super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
# Pragma mark-Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
-(Void) prepareForSegue :( UIStoryboardSegue *) segue sender :( id) sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@ End