Swift 2.0 - `nil` or `0` enum arguments

前端 未结 3 1769
無奈伤痛
無奈伤痛 2020-12-11 03:46

I\'ve run into this a on a couple functions in Swift 2.0 and wondering if there is a work around. There seems to be no way to not specify enum arguments in Swift 2.0 now. Fo

3条回答
  •  感情败类
    2020-12-11 04:26

    You pass [] (an empty set)

    Some enums have an explicit option that means 0, but Swift 3 sometimes do not import these, because [] means the same thing. Like UIViewAutoresizing's UIViewAutoresizingNone

提交回复
热议问题