UIToolBar高度不会改变
我有一个非常顽固的 UIToolbar,无论我尝试如何不同的方法,它都拒绝改变其高度。
我已经看到这个问题,它对我不起作用
它是我拍照时cameraOverlayView 的工具栏。这是我尝试过的方法,但没有成功:
-调整其当前框架的高度
-为其框架创建一个新的 CGRect -
子类化 UIToolbar 并编辑其 drawRect 函数
- (void)drawRect:(CGRect)rect
{
//Create a rectangle for the toolbar
CGRect rectArea = CGRectMake(0, 0, 320, 70);
[self setFrame:rectArea];
}
是否有一些我不知道的属性阻止 UIToolbar 调整其高度?
I've got a very stubborn UIToolbar, who refuses to change its height no matter how may different methods I try.
I've seen this question and it does not work for me
Is there a way to change the height of a UIToolbar?
It is a toolbar for my cameraOverlayView while taking a picture. here is what I've tried and has not worked:
-Adjusting its current frame's height
-Creating a new CGRect for its frame
-Subclassing UIToolbar and editing its drawRect function
- (void)drawRect:(CGRect)rect
{
//Create a rectangle for the toolbar
CGRect rectArea = CGRectMake(0, 0, 320, 70);
[self setFrame:rectArea];
}
Is there some property I'm unaware of which prevents a UIToolbar from adjusting its height?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需按照如何更改 UIToolbar 的高度< /a>
Just Follow How to change the height of UIToolbar