iOS:更改UISegmentedcontrol的高度 [英] iOS: change the height of UISegmentedcontrol
本文介绍了iOS:更改UISegmentedcontrol的高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试更改UISegmentedcontrol的高度,但在Interface Builder中不允许这样做。有没有办法改变或者不可能?
I am trying to change the height of UISegmentedcontrol, but it is not allowed in the Interface Builder. Is there any way to change or it is impossible?
谢谢
推荐答案
是的,您可以在代码中使用 [mySegmentedControl setFrame:frame]
。不幸的是你不能在IB中这样做。
Yes, you can use [mySegmentedControl setFrame:frame]
in code. It is unfortunate that you can't do this in IB.
所以,如果你只是想改变高度:
So, if you just want to change the height:
CGRect frame= mySegmentedControl.frame;
[mySegmentedControl setFrame:CGRectMake(frame.origin.x, frame.origin.y, frame.size.width, fNewHeight)];
这篇关于iOS:更改UISegmentedcontrol的高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文