【发布时间】:2023-04-03 20:14:01
【问题描述】:
经过阅读,我发现您可以自定义 UISwitch 控件上的文本和颜色。我很好奇这些方法是否会导致尝试让我的应用获得批准并包含在 App Store 中的问题。
取自iPhone Developer's Cookbook Sample Code的示例代码:
// Custom font, color
switchView = [[UICustomSwitch alloc] initWithFrame:CGRectZero];
[switchView setCenter:CGPointMake(160.0f,260.0f)];
[switchView setLeftLabelText: @"Foo"];
[switchView setRightLabelText: @"Bar"];
[[switchView rightLabel] setFont:[UIFont fontWithName:@"Georgia" size:16.0f]];
[[switchView leftLabel] setFont:[UIFont fontWithName:@"Georgia" size:16.0f]];
[[switchView leftLabel] setTextColor:[UIColor yellowColor]];
【问题讨论】:
标签: iphone objective-c