Unable to center UIPopoverController
<p>In my app I'm trying to center a <code>UIPopoverController</code> (I've to use it because my app it's compatible with iOS 7). I'm trying to center it without success. My code to center it's the follow:</p>

<pre><code>        SummaryViewController *summaryViewController = [[SummaryViewController alloc] init];
        summaryViewController.delegate = self;
        aPopover = [[UIPopoverController alloc] initWithContentViewController:summaryViewController];
        aPopover.popoverContentSize = CGSizeMake(summaryViewController.view.frame.size.width, summaryViewController.view.frame.size.height);

        CGFloat width = [[UIScreen mainScreen] bounds].size.width;
        CGFloat height = [[UIScreen mainScreen] bounds].size.height;
        CGFloat popoverWidth = summaryViewController.view.frame.size.width;
        CGFloat popoverHeight = summaryViewController.view.frame.size.height;

        CGRect rect = CGRectMake((width - popoverWidth) / 2.0, (height -popoverHeight) / 2.0, 1, 1);
        [aPopover presentPopoverFromRect:rect inView:self.view permittedArrowDirections:0 animated:YES];
</code></pre>

<p>It always shows me the popover in the left corner...
What's wrong with this code?</p>