我有一個非常固執的UIToolbar,誰拒絕改變它的高度,不管我怎麼嘗試不同的方法。UIToolBar高度不會改變
我已經看到了這個問題,並沒有爲我工作
Is there a way to change the height of a UIToolbar?
這是我的cameraOverlayView工具欄,同時拍照。這裏是我試過,也沒有工作:
-Adjusting當前幀的高度
-Creating一個新的CGRect其框架
-Subclassing UIToolbar和編輯它的drawRect功能
- (void)drawRect:(CGRect)rect
{
//Create a rectangle for the toolbar
CGRect rectArea = CGRectMake(0, 0, 320, 70);
[self setFrame:rectArea];
}
是否有一些屬性我不知道哪些可以防止UIToolbar調整其高度?
忽略什麼我prev。說:http://stackoverflow.com/questions/2135407/is-there-a-way-to-change-the-height-of-a-uitoolbar – Dair 2011-05-16 03:47:47
'setFrame:'應該可以正常工作。如果你打算重寫drawRect,你應該可以調用'[super drawRect:rect]' – Joe 2011-05-16 04:18:24