Get the screen width and height in iOS
Solution:
You can get the screen width and height using the below code...You can access it anyware..
Objective C:
You can get the screen width and height using the below code...You can access it anyware..
Objective C:
CGRect viewRect = [[UIScreen mainScreen] bounds];
CGFloat viewWidth = viewRect.size.width;
CGFloat viewHeight = viewRect.size.height;
Swift:
let viewRect = UIScreen.main.bounds
let viewWidth = viewRect.size.width
let viewHeight = viewRect.size.height
Comments
Post a Comment