0
我旋轉按鈕時無法解決此問題。按鈕旋轉後截短的文本
這裏是我的代碼:
newButton.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"btn_maintab_60x146.png"]];
newButton.frame = CGRectMake(0, 0, 60, 146);
[newButton.titleLabel setFont:[UIFont fontWithName:@"Baskerville-SemiBold" size:21.0f]];[newButton.titleLabel setFrame:CGRectMake(0, 0, 60, 146)];
[newButton.titleLabel setTransform:CGAffineTransformMakeRotation(M_PI_2)];
[newButton setTitle:title forState:UIControlStateNormal];
而且按鈕變成這樣:對於按鈕文本
感謝您的回答,但它沒有改變任何東西。該文本仍被截斷。 –
您是否使用XIB創建了按鈕? – iPatel
沒有。我以編程方式創建按鈕。 –