summaryrefslogtreecommitdiff
path: root/Juick/ViewControllers/DiscoverViewController.m
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-05-06 14:45:29 +0300
committerGravatar Vitaly Takmazov2018-05-06 14:45:29 +0300
commitfc33f645eaa64388e6a14a9e1a4662fb42615e4b (patch)
treed43481f680ab14ebbe7f4628f592fdfb03cc7bf0 /Juick/ViewControllers/DiscoverViewController.m
parent6fb5b792206b5c4ea37211a21ebe8cff43486d76 (diff)
fix iPad popovers
Diffstat (limited to 'Juick/ViewControllers/DiscoverViewController.m')
-rw-r--r--Juick/ViewControllers/DiscoverViewController.m6
1 files changed, 6 insertions, 0 deletions
diff --git a/Juick/ViewControllers/DiscoverViewController.m b/Juick/ViewControllers/DiscoverViewController.m
index a02f23c..67036c6 100644
--- a/Juick/ViewControllers/DiscoverViewController.m
+++ b/Juick/ViewControllers/DiscoverViewController.m
@@ -127,6 +127,12 @@
[self refreshData:NO];
}]];
[filterAlert.view setTintColor:[ColorScheme linkColor]];
+ UIPopoverPresentationController *popover = [filterAlert popoverPresentationController];
+ if (popover) {
+ popover.sourceView = self.view;
+ popover.sourceRect = CGRectMake(CGRectGetMidX(self.view.bounds), CGRectGetMidY(self.view.bounds), 0, 0);
+ popover.permittedArrowDirections = UIPopoverArrowDirectionUp;
+ }
[self presentViewController:filterAlert animated:YES completion:nil];
}