Unable to set / increase the size of UIActivityindicator view

I am trying to set the size UIActivityindicatorview

with setframe

. It can set the position, but not the size of the control. Is there another way?

This is the relevant code.

 UIActivityIndicatorView*  mySpinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
    mySpinner.frame=CGRectMake((375/2)-25,210 , 100, 100);
    mySpinner.color=[UIColor blueColor];
     mySpinner.center =self.view.center;
   mySpinner.hidesWhenStopped = YES;
    [self.view addSubview:mySpinner];

      

+3


source to share


1 answer


What I did to resize ActivityIndicator

in the app:

Just apply Transform to your activity indicator and Rescale it.



Here is the code

UIActivityIndicatorView*  mySpinner = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
mySpinner.transform = CGAffineTransformMakeScale(1.5, 1.5);
mySpinner.color=[UIColor blueColor];
mySpinner.center =self.view.center;
mySpinner.hidesWhenStopped = YES;
[self.view addSubview:mySpinner];

      

+11


source







All Articles