gpt4 book ai didi

ios - 将取消按钮放在底部的 UIActionSheet 中

转载 作者:可可西里 更新时间:2023-11-01 04:35:46 25 4
gpt4 key购买 nike

在 UIActionSheet 中,我有一个 uitableview 和取消按钮。默认情况下,取消按钮出现在顶部。我想让它在 tableview 之后出现在底部。我该怎么做?

最佳答案

这对我有用:

UIActionSheet *actionSheet = [[UIActionSheet alloc] initWithTitle:@"SomeTitle" delegate:self cancelButtonTitle:nil destructiveButtonTitle:nil otherButtonTitles:nil, nil];
[actionSheet addButtonWithTitle:@"Some Action"];
[actionSheet addButtonWithTitle:@"Cancel"];
actionSheet.cancelButtonIndex = actionSheet.numberOfButtons -1;

关于ios - 将取消按钮放在底部的 UIActionSheet 中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16140805/

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