Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我只想使用 iPhone 系统字体,但我不知道该怎么称呼它。sizeWithFont:@"HelveticaNeue" 给了我一个错误的参数错误。sizeWithFont:System 给我一个未初始化的变量错误。看起来应该很明显,但我看不到。
根据文档:
- [NSString sizeWithFont:]
以 anUIFont作为参数,而不是NSString. 你应该使用类似的东西
UIFont
NSString
[string sizeWithFont:[UIFont fontWithName:@"Helvetica" size:12.0]]
反而。