1

I'm writing a tvOS app using Xcode 9.2, targeting tvOS 11.

I have a UIProgressView and I'm trying to set it's style to .bar but Xcode says ".bar is not available".

How can I use the .bar style for the UIProgressView on my tvOS app?

Matt Mc
  • 8,882
  • 6
  • 53
  • 89

1 Answers1

4

The style bar of UIProgressView is only defined in the iOS SDK. It is defined as __TVOS_PROHIBITED in UIKit:

typedef NS_ENUM(NSInteger, UIProgressViewStyle) {
    UIProgressViewStyleDefault,     // normal progress bar
    UIProgressViewStyleBar __TVOS_PROHIBITED,     // for use in a toolbar
};

Also described like that in the documentation: https://developer.apple.com/documentation/uikit/uiprogressviewstyle/1619835-bar

Bar Style Documentation

David Cordero
  • 770
  • 6
  • 16
  • 2
    Ended up using https://github.com/gregttn/GTProgressBar instead. CocoaPods spec didn't include tvOS but I submitted a PR to fix that. Works great. – Matt Mc Feb 07 '18 at 18:28