GetScreenSize

CGSize size = [self getScreenSize];
player.view.frame = CGRectMake(0, 50, size.width,size.height);
[self.view addSubview:player.view];

– (CGSize)getScreenSize
{
//Get Screen size
CGSize size;
if (UIInterfaceOrientationIsLandscape([UIApplication sharedApplication].statusBarOrientation) && [[UIScreen mainScreen] bounds].size.height > [[UIScreen mainScreen] bounds].size.width) {
// in Landscape mode, width always higher than height
size.width = [[UIScreen mainScreen] bounds].size.height;
size.height = [[UIScreen mainScreen] bounds].size.width;
} else if (UIInterfaceOrientationIsPortrait([UIApplication sharedApplication].statusBarOrientation) && [[UIScreen mainScreen] bounds].size.height < [[UIScreen mainScreen] bounds].size.width) {
// in Portrait mode, height always higher than width
size.width = [[UIScreen mainScreen] bounds].size.height;
size.height = [[UIScreen mainScreen] bounds].size.width;
} else {
// otherwise it is normal
size.height = [[UIScreen mainScreen] bounds].size.height;
size.width = [[UIScreen mainScreen] bounds].size.width;
}
return size;
}