gpt4 book ai didi

swift - 检查 indexPath.row 是否是第 1-10 行?

转载 作者:行者123 更新时间:2023-11-28 09:35:53 26 4
gpt4 key购买 nike

<分区>

if indexPath.row == 0 ... 11 {

}

这不起作用,它说二元运算符“==”不能应用于类型“Int”和“CountableClosedRange”的操作数。

(这样做的目的是禁用第 0-12 行。)

执行此操作的正确方法是什么?基本问题,但我不知道用谷歌搜索什么。提前致谢!

如果我不得不猜测它会是:

for numero in 0 ... 11 {
if indexPath.row == numero {

}
}

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