mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
Gate ASButtonNode setTitle method since [UIFont buttonFontSize] is unavailable on tvOS 9.1
This commit is contained in:
@@ -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.
|
||||
*
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user