In my Universal app, in iPAd part I am resizing the activity indicator...
I want to resize my activity indicator..
But there are really iOS problems first here is my code...
-(void)startSpinner {
spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
/*spinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray]; */
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];
/*1*/ **[spinner setColor:[UIColor blackColor]];**
[spinner startAnimating];
}
Problem 1:
iOS 5.0 : It is showing me activity indicator but could not resize it. Size is not changing in isPAd Method.
iOS 4.3 : It is giving me Signal Abort Error on changing the color. /1/Bolded Line in code to set color. Here If I remove setColor in iOS 5.0 in WhiteLargeStyle it is not showing me in White background.
Here If I use Activity Indicator style like gray it is absolutely small in iPAd.works but could not resize.
In iOS 4.3 frame get effects but ios 5.0 frames are not effective...
So, How should I resize the activity indicator...
Try setting the CGAffineTransform of the activity indicator:
CGAffineTransform transform = CGAffineTransformMakeScale(1.5f, 1.5f);
activityIndicator.transform = transform;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With