私はアプリを開発していて、グローバル形式を適用するために、次の行を appDelegate.m ファイルに追加しました。
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
[self customizeAppearance];
return YES;
}
-(void)customizeAppearance{
int iOSVersion = [[[UIDevice currentDevice]systemVersion] intValue];
if (iOSVersion >= 7) {
//Customizing UIButton
[[UIButton appearance]setBackgroundColor:(UIColorFromRGB(toolbarTintColor))];
[[UIButton appearance]setTitleColor:(UIColorFromRGB(toolbarTextColor)) forState:UIControlStateNormal];
}
if (iOSVersion < 7) {
//Customizing UIButton
[[UIButton appearance]setBackgroundImage:[UIImage imageNamed:@"Button.png"] forState:UIControlStateNormal];
}
}
UIbuttonスタイルを変更するiOSバージョンに応じてこれら2つのスタイルを実行しましたが、UIBarButtonItemsではなくUIButtonsにのみ適用したいのですが、それは可能ですか??
これをさらに一歩進めて、このフォーマットをUIView要素内のUIButtons(UITableViewCellsなどではなく)にグローバルに適用したいのですが、それはできますか???
サポートを事前に感謝します