gpt4 book ai didi

ios - 在 UIButton 上放置详细信息披露按钮

转载 作者:行者123 更新时间:2023-11-29 03:39:05 25 4
gpt4 key购买 nike

如何在 UIButton 中的文本右侧添加详细信息披露按钮(也许使用边缘插入)?

最佳答案

您可以创建 UIButtonTypeDetailDisclosure 类型的 UIButton 并将其添加为按钮的 subview 。

喜欢:

UIButton *mainButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[mainButton setTitle:@"Click" forState:UIControlStateNormal];
[mainButton setFrame:CGRectMake(10, 10, 100, 50)];
[self.view addSubview:mainButton];

//Detail Disclosure button
UIButton *detailButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure];
[detailButton setFrame:CGRectMake(70, 10, 30, 30)];
[mainButton addSubview:detailButton];

关于ios - 在 UIButton 上放置详细信息披露按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18714804/

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