I am trying to create several views for an iPad application. First I created a menu view, and then a submenu with coordinates according to the menu. So it looks like this:

What I've done:
self.view = [[UIView alloc] initWithFrame:CGRectMake(self.parentViewController.view.frame.size.width, 0, 150, screenHeight)];
But now in the submenu, I'm trying to create a content view, which is a UINavigationController. Trying to do the same, I get this result:

What am I doing (this time creating a frame on a submenu view controller):
CGRect frame = CGRectMake(self.view.frame.origin.x + self.view.frame.size.width, 0, [[UIScreen mainScreen] bounds].size.width - self.view.frame.origin.x - self.view.frame.size.width, [[UIScreen mainScreen] bounds].size.height);
This is pretty clear, but I just get the start of the submenu and add its width to get the coordinate of the right edge.
After many attempts, I managed to get it to work because I noticed that CGRectMake uses the UINavigationController view center to streamline its position. So the following code:
CGRect frame = CGRectMake(self.view.frame.origin.x + self.view.frame.size.width + 259, 0, [[UIScreen mainScreen] bounds].size.width - self.view.frame.origin.x - self.view.frame.size.width, [[UIScreen mainScreen] bounds].size.height);
Sets the correct position.
What's happening? I thought that the origin of CGRectMake will always be top left, but this is actually a top-midpoint view (or mid-midpoint, not sure). What am I doing wrong?
EDIT1:
Here's the console output for the frame with the correct position:

Note that the navigation bar is now positioned correctly:

But the x-coordinate is not 250 (as it should be, because menu.width + sub-menu.width = 250.)
EDIT2:
In the end, I gave up. The problem was the automatically generated UINavigationBar, which is created by the UINavigationViewController. I canβt figure out how to configure it. I am going to leave the question open if someone knows the answer.