【发布时间】:2011-06-05 05:53:01
【问题描述】:
我在iPad 的横向模式应用程序中使用UIActionSheet。我的一些按钮的文本不适合宽度,它们从最后被裁剪。在iPhone 中处理了这个问题,我的操作表按钮即使很长也可以放入框架中。我不明白为什么这在 iPad 中有所不同。你们对我如何完成adjustsFontSizeToFitWidth 方法对UILabels 所做的事情有什么想法吗?
以下是我创建和显示操作表的方式:
UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:nil delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil];
for (NSString *bank in self.getBanksResponse.banks) {
[actionSheet addButtonWithTitle:bank];
}
[actionSheet showFromRect:self.bankButton.frame inView:self.view animated:YES];
[actionSheet release];
这是我的操作表的屏幕截图:
提前谢谢...
【问题讨论】:
标签: objective-c ipad uiactionsheet