```cpp enum Iter: Int{ case s1=0, s2, s3, s4 mutating func next(){ if self == .s4 { self = .s1 return } self = Iter.fromRaw(self.toRaw()+1)! } }
var s = Iter.s1
for i in 1 .. 10 { println(s.toRaw()) s.next() } ```
next enum in swift,布布扣,bubuko.com
原文地址:http://www.cnblogs.com/lightlfyan/p/3767555.html