I have created enum
in swift. I want to set value to enum
in objective C. I am unable to get enum
value in Objective C. Gratitude for your help.
Asked
Active
Viewed 126 times
1

rmaddy
- 314,917
- 42
- 532
- 579

Vinay Podili
- 335
- 1
- 3
- 16
1 Answers
1
Just mark the enum by @objc
like this:
@objc enum FitMode: Int {
case Clip, Crop, Scale
}

Pavel Smejkal
- 3,600
- 6
- 27
- 45
-
Thanks dude for reply :), I have created variable for enum in Swift, I am unable to access enum variable from swift class into objective C class. So I am sending enum type (like FitMode.Clip) to swift function from objective C class. it works now :). Is there any better solution? – Vinay Podili Dec 01 '15 at 07:08