码迷,mamicode.com
首页 > 移动开发 > 详细

ios 系统自带的菊花(UIActivityIndicatorView)指示器

时间:2015-04-28 22:57:11      阅读:482      评论:0      收藏:0      [点我收藏+]

标签:


//

//  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


ios 系统自带的菊花(UIActivityIndicatorView)指示器

标签:

原文地址:http://blog.csdn.net/zhaoguodongios/article/details/45341727

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!