As of now I have the following code:
Code:
float xCenter;
float yCenter;
if (self.splitViewController.interfaceOrientation == UIInterfaceOrientationPortrait || self.splitViewController.interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown){
xCenter = 384;
yCenter = 512;
} else if (self.splitViewController.interfaceOrientation == UIInterfaceOrientationLandscapeLeft || self.splitViewController.interfaceOrientation == UIInterfaceOrientationLandscapeRight){
xCenter = 512;
yCenter = 384;
}
uinc.view.superview.center = CGPointMake(xCenter, yCenter);
Is there a better way to simplify this? All I want to do is to show this at the center of the screen. I tried assigning it to `self.splitViewController.view.center, but it does't give me the center as I want.
uinc is a UINavigationController presented in UIModalPresentationSheet, but I want to change the size of it and therefore have to set the location.