0
很簡單,我實現了UISearchBarDelegate,但在橫向模式下它看起來不對。搜索欄不會一直拉伸。 UISearchBarDelegate是不是假設用於橫向或有解決方案?UISearchBarDelegate在橫向不起作用
很簡單,我實現了UISearchBarDelegate,但在橫向模式下它看起來不對。搜索欄不會一直拉伸。 UISearchBarDelegate是不是假設用於橫向或有解決方案?UISearchBarDelegate在橫向不起作用
問題發生在委託人身上的可能性很小。這可能是autoresizingMask
設置不正確。它應該是,
searchBar.autoresizingMark = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin;
謝謝你的工作! (嗯,該方法應該是autoresizingMask,而不是autoresizingMake,但足夠接近!)但是,我知道UITableView也沒有拉伸,並且它不工作,如果我嘗試myTableView.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleBottomMargin;有任何想法嗎? – 2011-06-15 08:06:19
使用'UIViewAutoresizingFlexibleTopMargin'而不是'UIViewAutoresizingFlexibleBottomMargin'。 – 2011-06-15 08:08:36
感謝您的建議,但沒有奏效。嗯,我很驚訝,我發現這一個棘手。 – 2011-06-15 08:17:55