Help us understand the problem. What is going on with this article?

ToolbarのSegmented Controlを可変させる

More than 1 year has passed since last update.

方法

ナビゲータエリアから
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 の違い

Why do not you register as a user and use Qiita more conveniently?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away