How can I change the color as well as size of UIProgressBar in iPhone SDK
Assuming you mean a UIProgressView
, you can resize it as you would any other view, by setting the frame:
UIProgressView *progressView = [[UIProgressView alloc] initWithProgressViewStyle:UIProgressViewStyleBar];
[progressView setFrame:CGRectMake(0,0,320,10)];
or if you're using the default style, you can set the frame in the init method:
UIProgressView *progressView = [[UIProgressView alloc] initWithFrame:CGRectMake(0,0,320,10)];
As far as I know, the color of a UIProgressView
cannot be changed. You'll probably have to roll your own view for that.