gpt4 book ai didi

iphone - 如何自定义 UISegmentedControl 项目

转载 作者:行者123 更新时间:2023-11-29 13:07:19 41 4
gpt4 key购买 nike

如何使用不同类型的订单而不是矩形图像自定义 UISegmentedControl 项目,以及如何针对选定状态更改图像。

最佳答案

您可以使用 UIImage 设置背景图像。

- (void)setBackgroundImage:(UIImage *)backgroundImage forState:(UIControlState)state barMetrics:(UIBarMetrics)barMetrics

这里有一个很棒的教程: http://www.raywenderlich.com/21703/user-interface-customization-in-ios-6

关于iphone - 如何自定义 UISegmentedControl 项目,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18275826/

41 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com