Question

My iOS app was working on iOS 6 but when you build the app with xcode 5 using iOS7 device the progress bar style is changed and I can't return it as previous iOS6 style or even to change the height of the Progress View (Progress Bar). Is there any way to change the style of progress bar? I can see only default and bar in xcode.

Was it helpful?

Solution

This is a standard UIKit object. It will appear as it should on each system.

If you don't like the small bar in iOS 7, you should customise it.

You can do so quite easily with UIAppearance proxy but you'll need to do so with images, pretty simple, just make your images look like iOS 6, and you should get what you expect.

The properties you'll want to customise should be:

@property(nonatomic, retain) UIImage* progressImage NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR;
@property(nonatomic, retain) UIImage* trackImage NS_AVAILABLE_IOS(5_0) UI_APPEARANCE_SELECTOR;

OTHER TIPS

I changed the height of my UIProgressView directly in xib. I changed the style to Bar and loaded 2 images, one to progress image and other to track image. Worked for me. I hope it helps.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top