UIBarButtonItem
プログラムでナビゲーション バーに a を追加し、その色合いを Apple の "Done" とまったく同じ青い色合いに設定できるようにしたいと考えていますUIBarButtonItem
。
私はすでにこのコードブロックでAppleの赤い色合いのためにこれを行っています:
UIBarButtonItem *myDeleteButton = [[UIBarButtonItem alloc] initWithTitle:@"Clear" style:UIBarButtonItemStyleBordered target:self action:@selector(myDeleteItemsMethod:)];
myDeleteButton.tintcolor = [[UIColor alloc] initwithRed:1 green:0.0470275 blue:0.0116515 alpha:1];
self.navigationItem.rightBarButtonItem = myDeleteButton;
必要なのはRGB値だけだと思います。
UIBarButtonItem's
ストーリーボードで作成された色合いを「リバース エンジニアリング」しようとして苦労しています (UIColor
テキストとしてキャストできません)。
また、Xcode のカラー パレットには「開発者」の配色用の領域がありますが、「完了」ボタンの色が含まれていないようです。