gpt4 book ai didi

iphone - UIButton 选择颜色

转载 作者:可可西里 更新时间:2023-11-01 04:32:16 26 4
gpt4 key购买 nike

<分区>

我正在绘制自定义 UIButton 并希望在突出显示时设置蓝色。我怎样才能做到这一点?

UIButton *myButton = [UIButton buttonWithType:UIButtonTypeCustom];
[myButton setBackgroundImage:[[UIImage imageNamed:@"test.png"] stretchableImageWithLeftCapWidth:100 topCapHeight:0] forState:UIControlStateNormal];

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