在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
for var i = 0; i < segmentArray!.count; i++ { } 报错 Unary operator '++' cannot be applied to an operand of type '@lvalue Int’ 替代方案 for i in 0..<self.segmentArray!.count { print("--->", i) } // 递增 for i in 0 ..< self.segmentArray!.count { } // 递减 for i in (0 ..< self.segmentArray!.count).reversed() { } // NON-SEQUENTIAL INDEXING Using where for i in (0 ..< self.segmentArray!.count) where i % 2 == 0 { }
|
请发表评论