iphone - 制作一个垂直的 UIButton

标签 iphone

有没有办法让 UIButton 垂直显示,文本向下阅读,而不是横向显示?你能用IB或者编程的方式做到这一点吗?或者您需要使用 Photoshop 来制作自定义按钮吗?

干杯,山姆

最佳答案

// 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

关于iphone - 制作一个垂直的 UIButton,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2032916/

相关文章:

iphone - 如何将数据加载到Core Data中?

ios - iphone 4s 不缩放,但 5,6 和 6 plus 是

iphone - 向 tableView 添加一个单元格

iphone - IAP 创建 - 否 "Hosted Content"

iphone - DDMathParser 导致内存泄漏

iphone - iOS9 AVSpeechUtterance 的 AVSpeechSynthesizer 问题

iphone - 将 CGColorRef 作为指针存储在 NSArray 中

iphone - 核心数据不会持续更新数据库的属性

ios - 如何在 iPhone 的 authorize.net sdk 中传递 api 登录 key 和交易 ID?

iphone - 在运行时获取 CPU 使用率 | iOS