Переглянути джерело

Limit menu & open network controllers size in popover

Gleb Pinigin 12 роки тому
батько
коміт
fdd1e3e8ad

+ 5 - 0
AspenProject/VLCMenuViewController.m

@@ -65,6 +65,7 @@
 
         self.scrollView.contentSize = self.view.frame.size;
     }
+
     [self.aboutButton setTitle:NSLocalizedString(@"ABOUT_APP", @"") forState:UIControlStateNormal];
     [self.openNetworkStreamButton setTitle:NSLocalizedString(@"OPEN_NETWORK", @"") forState:UIControlStateNormal];
     [self.downloadFromHTTPServerButton setTitle:NSLocalizedString(@"DOWNLOAD_FROM_HTTP", @"") forState:UIControlStateNormal];
@@ -79,6 +80,10 @@
     [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(netReachabilityChanged:) name:kReachabilityChangedNotification object:nil];
 }
 
+- (CGSize)contentSizeForViewInPopover {
+    return [self.view sizeThatFits:CGSizeMake(320, 800)];
+}
+
 - (void)netReachabilityChanged:(NSNotification *)notification
 {
     if (_reachability.currentReachabilityStatus == ReachableViaWiFi) {

+ 4 - 0
AspenProject/VLCOpenNetworkStreamViewController.m

@@ -62,6 +62,10 @@
     [super viewWillDisappear:animated];
 }
 
+- (CGSize)contentSizeForViewInPopover {
+    return [self.view sizeThatFits:CGSizeMake(320, 800)];
+}
+
 #pragma mark - UI interaction
 - (IBAction)openButtonAction:(id)sender
 {