2010-01-09 55 views
2

反正是有有一個UIButton顯示器垂直,用文字跨越讀下來,而不是?你可以用IB或編程方式做到這一點嗎?或者你將不得不使用Photoshop來製作自定義按鈕?做一個垂直的UIButton

歡呼聲中,山姆

回答

2
// Define the transform 
CGAffineTransform transform = CGAffineTransformMakeRotation(90 * (M_PI/180)); 

// Initialize the UIView 
UIView *myView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 320)]; 

// Do the transformation 
// in this case, rotate the UIView 90 degrees 
myView.transform = transform; 

Source

+0

嗯,我在哪裏可以把這個?以及如何對其採取行動? – 2010-01-09 09:31:16

+0

(複製IB中的鏈接) – 2010-01-09 09:32:21

+0

只是覆蓋您的IBOutlet UIButton的transform屬性 – 2010-01-09 09:45:30