LoginSignup
0
0

More than 5 years have passed since last update.

ToolbarのSegmented Controlを可変させる

Last updated at Posted at 2017-11-20

方法

ナビゲータエリアから
Toolbar>Bar Button Item>Segmented Controlを選択し

ユーティリティエリアの
Size inspector>Segmented Control>Auto-Size Mode
Equal WidthsからProportinal to Content
に変更し、再度ナビゲータエリアからSegmented Controlを選択してドラッグでサイズを変更できる
(Size inspector>Viewからでも変更可)

しかし、これだと均等幅が崩れてしまうため、均等に戻したい場合は
サイズ調整後、再度Equal Widthsにすると均等になる

(なる時とならない時があるのでとりあえず取り消し線)

スクリーンショット 2017-11-20 12.15.20.png

スクリーンショット 2017-11-20 12.16.47.png

スクリーンショット 2017-11-20 13.05.03.png

各セグメントの幅を指定したい場合は
Size inspector>Segmented Control
Widthで指定できます
スクリーンショット 2017-11-20 13.20.27.png

他に良い方法があれば教えて下さると助かります

因みにSize inspector>View>Showの
Frame RectangleAlignment Rectangleの違いに関しては以下を参考
Xcode:Frame Rectangle と Alignment Rectangle の違い

0
0
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
0
0