1

I'm trying to define constant with type as CGFloat. My syntax is fine and also type is fine. But, I'm getting a weird problem. Please find code below as well the error screenshot.

enum CornerRadiusPercent : CGFloat {
    case ImageView = 44.5
    case Status = 40.0
}

I've found the similar SO question here, but not helped. Clean the build and compiled, not worked. Also I've replaced the text by clicking on the error red suggestion but keep on showing the same again and again.

enter image description here

Mani
  • 17,549
  • 13
  • 79
  • 100

1 Answers1

1

This error occur because you are not adding UIKit framework in you file just to add UIKit in your file, error will be vanished.

iPatel
  • 46,010
  • 16
  • 115
  • 137