Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display standard up/down controls in iOS toolbar

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.

arrow controls

Is there a way to show them programmatically?

like image 268
antalkerekes Avatar asked Feb 24 '23 19:02

antalkerekes


1 Answers

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.

like image 71
Anomie Avatar answered Mar 05 '23 04:03

Anomie