Created
May 31, 2012 14:48
-
-
Save arielelkin/2843907 to your computer and use it in GitHub Desktop.
Adding a loading wheel on top of some translucent shit
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
//You probably won't be able to use "self" in OF, | |
//so I'll let you figure out how to obtain the device's | |
//the width and height from OF | |
float screenWidth = self.view.frame.size.width; | |
float screenHeight = self.view.frame.size.height; | |
UIView *translucentShit = [[UIView alloc] initWithFrame:CGRectMake(0, 0, screenWidth, screenHeight)]; | |
[translucentShit setBackgroundColor:[UIColor blackColor]]; | |
translucentShit.alpha = 0.3; //set the transparency here | |
[self.view addSubview:translucentShit]; | |
UIActivityIndicatorView *loadingWheel = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; | |
loadingWheel.center = CGPointMake(screenWidth/2, screenHeight/2); | |
[self.view addSubview:loadingWheel]; | |
[loadingWheel startAnimating]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment