Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -(void)showActivityViewer
- {
- self.activityView = [[[UIView alloc] initWithFrame: CGRectMake(0, 0, self.view.window.bounds.size.width, self.view.window.bounds.size.height)] autorelease];
- activityView.backgroundColor = [UIColor blackColor];
- activityView.alpha = 0.5;
- self.activityWheel = [[[UIActivityIndicatorView alloc] initWithFrame: CGRectMake(self.view.window.bounds.size.width / 2 - 12, self.view.window.bounds.size.height / 2 - 12, 24, 24)] autorelease];
- activityWheel.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhiteLarge;
- activityWheel.autoresizingMask = (UIViewAutoresizingFlexibleLeftMargin |
- UIViewAutoresizingFlexibleRightMargin |
- UIViewAutoresizingFlexibleTopMargin |
- UIViewAutoresizingFlexibleBottomMargin);
- [activityView addSubview:activityWheel];
- [self.view.window addSubview: activityView];
- [[[activityView subviews] objectAtIndex:0] startAnimating];
- }
- -(void)removeActivityViewer {
- [activityWheel removeFromSuperview];
- [activityView removeFromSuperview];
- self.activityWheel = nil;
- self.activityView = nil;
- }
Add Comment
Please, Sign In to add comment