Swift structures properties is the same type as structure it self. Recursion? -


please me understand following swift construction:

struct uiviewanimationoptions : rawoptionsettype {     init(_ rawvalue: uint)     init(rawvalue rawvalue: uint)     static var layoutsubviews: uiviewanimationoptions { }     static var allowuserinteraction: uiviewanimationoptions { }     static var beginfromcurrentstate: uiviewanimationoptions { }     static var repeat: uiviewanimationoptions { }     static var autoreverse: uiviewanimationoptions { }     static var overrideinheritedduration: uiviewanimationoptions { } } 

i don't understand how structure properties of same type structure itself. , purpose getters empty? how thing works?
here brief example how using structure animation in code:

let options = uiviewanimationoptions.autoreverse | uiviewanimationoptions.repeat ... uiview.animatewithduration(1.0, delay: 0.0, options: options, animations: { ... }, completion: nil) 

these static properties, not associated instance of struct. (plus, properties may computed or stored; don't know. , it's possible have struct have computed instance property of own type.)


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -