tingxins / SakuraKit

🤡SakuraKit, a lightweight and powerful library for application to switching themes or skins.
https://tingxins.com/2017/08/ios-theme-skin-resolution/
MIT License
690 stars 116 forks source link

导航栏设置背景图片的方法没有 #9

Open dong136279559 opened 6 years ago

dong136279559 commented 6 years ago

UINavigationBar 想要设置背景图片,但是没有方法,没法使用tintcolor

seanLee commented 6 years ago
- (TXSakura2DUIntBlock)tx_sakuraNavigationBarImageWithName:(NSString *)name {
    return ^TXSakura *(NSString *path, NSUInteger state){
        return [self send2DMsgObjectAndIntWithName:name keyPath:path integ:state selTail:@"forBarMetrics:" argType:kTXSakuraArgImage valueBlock:^NSObject *(NSString *keyPath) {
            return  [TXSakuraManager tx_imageWithPath:keyPath];
        }];
    };
}

I add a method like this in TXSakura Class. It's a lazy way to change image.And you can define more property but not give the const value.