mirror of
https://github.com/HackPlan/IQKeyboardManager.git
synced 2026-03-29 08:47:51 +08:00
Fixed appearance proxy adoption.
This commit is contained in:
@@ -26,15 +26,17 @@
|
||||
|
||||
@implementation IQBarButtonItem
|
||||
|
||||
- (instancetype)init
|
||||
+(void)initialize
|
||||
{
|
||||
self = [super init];
|
||||
if (self)
|
||||
{
|
||||
//Removing tint
|
||||
[self setTintColor:nil];
|
||||
}
|
||||
return self;
|
||||
[super initialize];
|
||||
|
||||
[[self appearance] setTintColor:nil];
|
||||
[[self appearance] setTitleTextAttributes:nil forState:UIControlStateNormal];
|
||||
[[self appearance] setTitleTextAttributes:nil forState:UIControlStateHighlighted];
|
||||
[[self appearance] setTitleTextAttributes:nil forState:UIControlStateDisabled];
|
||||
[[self appearance] setTitleTextAttributes:nil forState:UIControlStateSelected];
|
||||
[[self appearance] setTitleTextAttributes:nil forState:UIControlStateApplication];
|
||||
[[self appearance] setTitleTextAttributes:nil forState:UIControlStateReserved];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
|
||||
#import <Foundation/NSObjCRuntime.h>
|
||||
#import "IQKeyboardManagerConstants.h"
|
||||
#import <UIKit/UIBarButtonItem.h>
|
||||
|
||||
#import "IQBarButtonItem.h"
|
||||
/*!
|
||||
@author Iftekhar Qurashi
|
||||
|
||||
@@ -34,7 +33,7 @@
|
||||
|
||||
@abstract BarButtonItem with title text.
|
||||
*/
|
||||
@interface IQTitleBarButtonItem : UIBarButtonItem
|
||||
@interface IQTitleBarButtonItem : IQBarButtonItem
|
||||
|
||||
@property(nonatomic, strong) UIFont *font; //Default is (system font 12.0 bold)
|
||||
|
||||
|
||||
@@ -31,6 +31,15 @@
|
||||
@implementation IQToolbar
|
||||
@synthesize titleFont = _titleFont;
|
||||
|
||||
+(void)initialize
|
||||
{
|
||||
[super initialize];
|
||||
|
||||
[[self appearance] setTintColor:nil];
|
||||
[[self appearance] setBarTintColor:nil];
|
||||
[[self appearance] setBackgroundColor:nil];
|
||||
}
|
||||
|
||||
-(void)initialize
|
||||
{
|
||||
[self sizeToFit];
|
||||
|
||||
Reference in New Issue
Block a user