In my universal application in the part of iPAd I change the size of the activity indicator ...
I want to change the size of the activity indicator.
But there are really problems with iOS first here is my code ...
-(void)startSpinner { spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge]; spinner.hidden = NO; NSLog(@"Start Spinner"); if([self isPad]) spinner.frame = CGRectMake(self.view.frame.size.width/2, self.view.frame.size.height/2,100, 100); else spinner.frame = CGRectMake(self.view.frame.size.width/2, self.view.frame.size.height/2,50, 50); NSLog(@"Dpinner size %f",spinner.frame.size.width); [spinner setHidesWhenStopped:YES]; [self.view addSubview:spinner]; [self.view bringSubviewToFront:spinner]; **[spinner setColor:[UIColor blackColor]];** [spinner startAnimating]; }
Problem 1:
iOS 5.0: it shows me an activity indicator, but cannot resize it. The size does not change in the isPAd method.
iOS 4.3: This gives me a cancel error message when the color changes. / 1 / Bolded Line in the code for setting the color. Here If I delete setColor in iOS 5.0 in WhiteLargeStyle , it will not show me on a white background.
Here, if I use the Activity Indicator style, for example gray , it is quite small in iPAd.works, but cannot resize.
In iOS 4.3, frames get effects, but ios 5.0 frames are not effective ...
So, how do I resize the activity indicator ...
ios objective-c iphone cocoa-touch
Arpit B Parekh Dec 21 '11 at 6:05 2011-12-21 06:05
source share