Я хочу создать тот же popover для своего iPhone-приложения размером GGrect
из (320 100.0)
. Вот мой старый код:Shift to UIPopoverPresentationController
View * pk1 = [[View alloc] init];
UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:pk1];
pop = [[UIPopoverController alloc] initWithContentViewController:nav];
[pop setDelegate:self];
[pop presentPopoverFromRect:[self btnsavepart].frame inView:[self view] permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
[nav release];
Я с помощью этой коды, но его не меняет
nav.preferredContentSize = CGSizeMake(320, 100);
Я не могу изменить UIpopovercontriller
с UIPopoverPresentationController
.
Как указать GGrect
из (320 100.0)
?
Я думаю, что могу изменить только по горизонтали, но как я могу это сделать.
View *viewController = [[[View alloc] init] autorelease];
UINavigationController *navController = [[[UINavigationController alloc] initWithRootViewController:viewController] autorelease];
navController.modalPresentationStyle = UIModalPresentationPopover;
navController.popoverPresentationController.permittedArrowDirections = UIPopoverArrowDirectionUp;
navController.popoverPresentationController.sourceRect = btnsavepart.bounds;
navController.popoverPresentationController.sourceView = btnsavepart;
navController.popoverPresentationController.delegate = self;
[self presentViewController:navController animated:YES completion:nil];
я хочу UIPopoverPresentationController не FullScreen формы в iPhone
я добавлять эти коды, но я дать Полноэкранный
- (UIModalPresentationStyle)adaptivePresentationStyleForPresentationController:(UIPresentationController *)controller
{
return NO;
}
Возможный дубликат [UIPopoverPresentationController на iOS 8 iPhone] (http://stackoverflow.com/questions/25319179/uipopoverpresentationcontroller-on-ios-8-iphone) –
Я не думаю, что это дубликат из-за * "I не может изменить UIpopovercontriller с UIPopoverPresentationController "*. – jww
@jww Почему это имеет значение? ОП в этом вопросе пытается использовать 'UIPopoverPresentationController', чтобы представить popover в этом вопросе, как в дублированном вопросе. –