UISegmentedControl - altering height in Interface Builder

后端 未结 7 648
萌比男神i
萌比男神i 2021-02-02 11:54

I\'m creating a number of static custom UITableViewCells and have dragged a UISegmentedControl onto one of the custom cells.

Whilst the segmen

相关标签:
7条回答
  • 2021-02-02 12:51

    You can also open the xib file in any text editor, like Dashcode or MacVim or TextEdit - it's an XML. Then find your element there, in my case it looked like:

    <object class="IBUISegmentedControl" id="270020637">
        [...]
        <string key="NSFrame">{{20, 154}, {176, 44}}</string>
        [...]
    </object>
    

    Then you can change the 44 into whatever height you want - you'll see the changes in IB.

    This works for all elements that can't be changed height in IB - UIPicker also...

    0 讨论(0)
提交回复
热议问题