Skip to content

Instantly share code, notes, and snippets.

@shinriyo
Created February 8, 2013 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shinriyo/4738250 to your computer and use it in GitHub Desktop.
Save shinriyo/4738250 to your computer and use it in GitHub Desktop.
iOSのインジゲーターができない Objective−C側
#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