更新时间:2022-12-21 13:22:43
您可以将标准头文件导入所有控制器,并为样式设置几个常量...示例:
You could import a standard header file into all your controllers with several constants set for styling... example:
Styles.h
#define kFontSize 14
#define kFontFamily @"Helevetica"
控制器
#import "Styles.h" // at the top
myLabel.font = [UIFont fontWithName:kFontFamily size:kFontSize];
我个人认为Interface Builder是***的造型方式,但这会直接回答你的问题。
I personally think Interface Builder is the best way to style, however this answers your question directly.