581Resizing an UIImage

Nice and simple Category to resize an UIImage

@interface UIImage (Resize)

- (UIImage*)scaleToSize:(CGSize)size;

@end
#import "UIImageResize.h"
#import 

@implementation UIImage (Resize)

- (UIImage*)scaleToSize:(CGSize)size {

    UIGraphicsBeginImageContext(size);

    [self drawInRect:CGRectMake(0, 0, size.width, size.height)];

    UIImage* scaledImage = UIGraphicsGetImageFromCurrentImageContext();

    UIGraphicsEndImageContext();

    return scaledImage;
}

@end

71UIActivityIndicatorView size -> 20px

height: 20px width: 20px

all styles typedef enum { UIActivityIndicatorViewStyleWhiteLarge, UIActivityIndicatorViewStyleWhite, UIActivityIndicatorViewStyleGray, } UIActivityIndicatorViewStyle;