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.

有帮助吗?

解决方案

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;

其他提示

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top