Created
February 8, 2013 11:19
-
-
Save shinriyo/4738250 to your computer and use it in GitHub Desktop.
iOSのインジゲーターができない Objective−C側
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#ifdef __cplusplus | |
extern "C" { | |
#endif | |
static UIActivityIndicatorView* spinner = nil; | |
void startSpinner() { | |
if(spinner == nil) { | |
spinner = [[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(0, 0, 100, 80)]; | |
} | |
[spinner startAnimating]; | |
} | |
void stopSpinner() { | |
if(spinner == nil) { | |
return; | |
} | |
if( ![spinner isAnimating] ) { | |
return; | |
} | |
[spinner stopAnimating]; | |
} | |
#ifdef __cplusplus | |
} | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment