开发者

UIToolBar Height won't change

开发者 https://www.devze.com 2023-03-05 22:42 出处:网络
I\'ve got a very stubborn UIToolbar, who refuses to change its height no matter how may different methods I try.

I've got a very stubborn UIToolbar, who refuses to change its height no matter how may different methods I try.

I've se开发者_运维百科en 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?


Just Follow How to change the height of UIToolbar

0

精彩评论

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