LoginSignup
9
3

More than 5 years have passed since last update.

Xcode「Plain Style unsupported in a Navigation Item」のWarningが出た時の対応

Posted at

storyboardでいろいろとパーツを配置していると、このWarningが出るようになりました。

スクリーンショット 2015-12-03 19.12.10.jpg

Unsupported Configuration
Plain Style unsupported in a Navigation Item

和訳としては"Navigation ItemのPlainスタイルはサポートしていません"(そのままですが…)ということ。

UIBarButtonItemには3つの種類があります。

  • UIBarButtonItemStylePlain:枠線が無いボタン
  • UIBarButtonItemStyleBordered:枠線があるボタン
  • UBarButtonItemStyleDone:青いボタン

元々iOS7以前ではこの設定でボタンの種類で切り替えていました。
ですが、iOS7以降ではデザインが刷新されて、「UBarButtonItemStyleDone」一択になりました。

なので、BarButtonItemのところでこうなっているのを…

スクリーンショット 2015-12-03 19.12.26.jpg

こうします。

スクリーンショット 2015-12-03 19.12.55.jpg

すると、Warningが解消されます。

動作的には同じで、特に問題ないんですがWarningが出ていて解消されないままはむずむずするので、これで解消。

UIBarButtonItemStylePlainがサポートされないなら、デフォルト値を変えてくれればいいのに…と思うのですが、、、

9
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
3