我有一個包含以下enum
迅速類編譯顯示如下錯誤:不能使用SWIFT類枚舉的目標C
:0: error: cannot assign value of type '(imageFile: String) -> AlertStyle' to type 'AlertStyle'
我該如何解決它?
我有一個包含以下enum
迅速類編譯顯示如下錯誤:不能使用SWIFT類枚舉的目標C
:0: error: cannot assign value of type '(imageFile: String) -> AlertStyle' to type 'AlertStyle'
我該如何解決它?
枚舉具有相關聯的值不能在的OBJ-C來表示。如果您不需要從objc-c獲得您的枚舉,則可以刪除@objc聲明。在其他情況下,您需要重新設計您的解決方案。
不幸的是,不能在目標C.使用相關值
'@objc enum'不能使用關聯值,請比較http://stackoverflow.com/a/30480399/1187415。 –