hi anh em, mình muốn thiết kế 1 giao diện nằm ngang được fix cứng theo kiểu Landscape ngay từ khi bắt đầu chạy chưong trình, nhưng khi mình vẽ button thì nó cứ bị ép phải nằm dọc theo portrait, có cách nào để fix cái button đó về kiểu Landscape không ??
Đã được chỉnh sửa lần cuối bởi Iphone4 : 30-08-2011 lúc 12:04 AM.
Code:- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations if ( UIInterfaceOrientationIsLandscape(interfaceOrientation)) { return YES; } if (UIInterfaceOrientationIsPortrait(interfaceOrientation)) { return YES; } return NO; }