开发者

How to display standard up/down controls in iOS toolbar

开发者 https://www.devze.com 2023-02-16 22:10 出处:网络
I was wondering if Apple provides standard controls for the up/down arrow keys for the toolbar? All the other familiar buttons are present in Interface Builder, but not the arrow keys.

I was wondering if Apple provides standard controls for the up/down arrow keys for the toolbar? All the other familiar buttons are present in Interface Builder, but not the arrow keys.

How to display standard up/down controls in iOS toolbar

Is there a w开发者_开发百科ay to show them programmatically?


There is no public built-in control to display such a button. You can easily enough create your own, though, with a UISegmentedControl and momentary set to YES (put it in the toolbar using [[UIBarButtonItem alloc] initWithCustomView:...], of course).

You can probably use the Unicode characters U+25B2 for ▲ and U+25BC for ▼, or you can use appropriate images.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号