diff options
author | Vitaly Takmazov | 2018-05-06 14:45:29 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-05-06 14:45:29 +0300 |
commit | fc33f645eaa64388e6a14a9e1a4662fb42615e4b (patch) | |
tree | d43481f680ab14ebbe7f4628f592fdfb03cc7bf0 /Juick/Model/User.m | |
parent | 6fb5b792206b5c4ea37211a21ebe8cff43486d76 (diff) |
fix iPad popovers
Diffstat (limited to 'Juick/Model/User.m')
-rw-r--r-- | Juick/Model/User.m | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Juick/Model/User.m b/Juick/Model/User.m index 38e4269..8c20aa3 100644 --- a/Juick/Model/User.m +++ b/Juick/Model/User.m @@ -22,6 +22,12 @@ [alert setTitle:@"Error"]; [alert setMessage:@"Unable to login, check username/password, or network connectivity"]; [alert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleCancel handler:nil]]; + UIPopoverPresentationController *popover = [alert popoverPresentationController]; + if (popover) { + popover.sourceView = view.view; + popover.sourceRect = CGRectMake(CGRectGetMidX(view.view.bounds), CGRectGetMidY(view.view.bounds), 0, 0); + popover.permittedArrowDirections = UIPopoverArrowDirectionDown; + } [view presentViewController:alert animated:YES completion:nil]; } |