JWButton
@interface JWButton : NSObject
An object containing the necessary information required to create a custom control bar button.
Note
Buttons are added to the control bar using the JWPlayerController’s addButton method.See
JWPlayerController-
The content of an SVG in string, used as the button icon.
Note
We recommend using this property instead of imageUrl because it ensure the control bar’s style applies to your button.Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *svgContent;
-
The URL of the image that will be used as the button icon. Can be a local or external path.
Note
Monochromatic, white icons of 24x24 pixels work well.Declaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *imageUrl;
-
The button’s name announced by voice over and accessibility readers.
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull accessibilityLabel;
-
The button’s delegate who will be notified when the viewer interacts with the button.
Note
Must conform to the JWButtonDelegate protocol.Declaration
Objective-C
@property (nonatomic, weak, readwrite, nullable) id<JWButtonDelegate> delegate;
-
The id used when styling your button using CSS.
Note
Must be unique across all buttons.See
JWSkinStylingDeclaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *cssId;
-
The class used when styling your button using CSS.
See
JWSkinStylingDeclaration
Objective-C
@property (nonatomic, copy, readonly, nullable) NSString *cssClass;
-
Unavailable
Undocumented
Declaration
Objective-C
- (instancetype)init NS_UNAVAILABLE;
-
Undocumented
Declaration
Objective-C
+ (instancetype)buttonWithSvgContent:(NSString *)svgContent accessibilityLabel:(NSString *)accessibilityLabel cssId:(NSString *_Nullable)cssId cssClass:(NSString *_Nullable)cssClass;
-
Undocumented
Declaration
Objective-C
- (instancetype)initWithSvgContent:(NSString *)svgContent accessibilityLabel:(NSString *)accessibilityLabel cssId:(NSString *_Nullable)cssId cssClass:(NSString *_Nullable)cssClass;
-
Undocumented
Declaration
Objective-C
+ (instancetype)buttonWithImageUrl:(NSString *)imageUrl accessibilityLabel:(NSString *)accessibilityLabel cssId:(NSString *_Nullable)cssId cssClass:(NSString *_Nullable)cssClass;
-
Undocumented
Declaration
Objective-C
- (instancetype)initWithImageUrl:(NSString *)imageUrl accessibilityLabel:(NSString *)accessibilityLabel cssId:(NSString *_Nullable)cssId cssClass:(NSString *_Nullable)cssClass;