すっきりとした白いデザインにしたいです。tintColor
そのため、プロパティをに設定しましたが、とwhiteColor
の下にこれらの暗い線がUINavigationBar
ありUISearchBar
ます。
暗い線を削除する方法や色を変更する方法を知っている人はいますか?
すっきりとした白いデザインにしたいです。tintColor
そのため、プロパティをに設定しましたが、とwhiteColor
の下にこれらの暗い線がUINavigationBar
ありUISearchBar
ます。
暗い線を削除する方法や色を変更する方法を知っている人はいますか?
カテゴリ別に UIImage にメソッドを追加する
+ (UIImage *)imageWithColor:(UIColor *)color {
CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 1.0f);
UIGraphicsBeginImageContext(rect.size);
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetFillColorWithColor(context, [color CGColor]);
CGContextFillRect(context, rect);
UIImage *theImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return theImage;
}
そして設定するだけ
[self.navigationController.navigationBar setShadowImage:[UIImage imageWithColor:[UIColor whiteColor]]];