UIScreen class is gone in ios10 simulator sdk

192 Views Asked by At

I used

[[UIScreen mainScreen] bounds].size.width

code before ios10. But when I build this code using ios10 simulator sdk, it occurs error like

"Receiver 'UIScreen' for class message is a forward declaration No known class method for selector 'mainScreen'".

And I know the UIScreen class is not existed in ios10 simulator sdk not ios10 sdk.

first, Is it different built in ios10 sdk with ios10 simulator?? and second, How can I handle this compile error.

0

There are 0 best solutions below