Post

Replies

Boosts

Views

Activity

Reply to xcode 13 - objc project
i just solved with this: - (UITraitCollection *)traitCollection { if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) { return super.traitCollection; } else { switch (self.modalPresentationStyle) { case UIModalPresentationFormSheet: case UIModalPresentationPopover: return [UITraitCollection traitCollectionWithHorizontalSizeClass:UIUserInterfaceSizeClassCompact]; default: return super.traitCollection; } } } - (UITraitCollection *)overrideTraitCollectionForChildViewController:(UIViewController *)childViewController { UIDevice *device = [UIDevice currentDevice]; if (device.userInterfaceIdiom == UIUserInterfaceIdiomPhone && CGRectGetWidth(childViewController.view.bounds) > CGRectGetHeight(childViewController.view.bounds)) { return [UITraitCollection traitCollectionWithHorizontalSizeClass:UIUserInterfaceSizeClassRegular]; } return nil; }
Topic: UI Frameworks SubTopic: UIKit Tags:
Jun ’21
Reply to xcode 13 - objc project
PopupLogin *comuni =[PopupLogin alloc]; popover=[[UIPopoverController alloc] initWithContentViewController:comuni]; if ([mainDelegate.aListdb count]>0) { [comuni.BtnDB setHidden:NO]; } else { [comuni.BtnDB setHidden:YES]; } popover.delegate = self; popover.popoverContentSize = CGSizeMake(550, 260); comuni._popover=popover; CGRect rect = CGRectMake((self.view.frame.size.width-550)/2, (self.view.frame.size.height-307)/2, 550, 307); [popover presentPopoverFromRect:rect inView:self.view permittedArrowDirections:0 animated:YES];
Topic: UI Frameworks SubTopic: UIKit Tags:
Jun ’21