diff --git a/AsyncDisplayKit/ASButtonNode.h b/AsyncDisplayKit/ASButtonNode.h index 305121b3a6..d949d1b51d 100644 --- a/AsyncDisplayKit/ASButtonNode.h +++ b/AsyncDisplayKit/ASButtonNode.h @@ -54,6 +54,7 @@ */ - (void)setAttributedTitle:(nullable NSAttributedString *)title forState:(ASControlState)state; +#if TARGET_OS_IOS /** * Sets the title to use for the specified state. This will reset styled title previously set with -setAttributedTitle:forState. * @@ -63,7 +64,7 @@ * @param state The state that uses the specified title. The possible values are described in ASControlState. */ - (void)setTitle:(nonnull NSString *)title withFont:(nullable UIFont *)font withColor:(nullable UIColor *)color forState:(ASControlState)state; - +#endif /** * Returns the image used for a button state. * diff --git a/AsyncDisplayKit/ASButtonNode.mm b/AsyncDisplayKit/ASButtonNode.mm index 7ed676e744..b22a707fca 100644 --- a/AsyncDisplayKit/ASButtonNode.mm +++ b/AsyncDisplayKit/ASButtonNode.mm @@ -196,6 +196,7 @@ [self setNeedsLayout]; } +#if TARGET_OS_IOS - (void)setTitle:(NSString *)title withFont:(UIFont *)font withColor:(UIColor *)color forState:(ASControlState)state { NSDictionary *attributes = @{ @@ -207,6 +208,7 @@ attributes:attributes]; [self setAttributedTitle:string forState:state]; } +#endif - (NSAttributedString *)attributedTitleForState:(ASControlState)state {