CGRect frame = [UIScreen mainScreen].applicationFrame; Or
CGRect frame = [UIScreen mainScreen] bounds];
Obtain the width of application screen (Same way for height):
UIWindow* window = [UIApplication sharedApplication].keyWindow;
float width = window.frame.size.width;
Or, float width = [UIScreen mainScreen] bounds].size.width;
No comments:
Post a Comment