-3
,无法在这个C风格的for循环转换中迅速3.如何转换C'style for循环中迅速3
for(i=num; i>=1; i--)
{
}
要转换上面的for循环中迅速3. 我已经看到类似这样的各种问题。但无法解决这个问题。 请帮我我是新来的迅速。
,无法在这个C风格的for循环转换中迅速3.如何转换C'style for循环中迅速3
for(i=num; i>=1; i--)
{
}
要转换上面的for循环中迅速3. 我已经看到类似这样的各种问题。但无法解决这个问题。 请帮我我是新来的迅速。
像这样:
for i in stride(from: num, through: 1, by: -1) {
}
http://stackoverflow.com/questions/24508592/how-to-iterate-for-loop-in-reverse-order-in-swift – simonWasHere
谢谢它解决了我的问题。 – aadityaa