• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Allow tap events outside a custom UIPresentationController on iPad(iOS 8)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Allow tap events outside a custom UIPresentationController on iPad(iOS 8)


  • Subject: Re: Allow tap events outside a custom UIPresentationController on iPad(iOS 8)
  • From: "Mazzaroth M." <email@hidden>
  • Date: Thu, 29 Jan 2015 09:15:55 -0500

I forgot to add the overridden methods:

- (CGRect)frameOfPresentedViewInContainerView
{
    CGRect presentedViewFrame = CGRectZero;
    CGRect containerBounds = [[self containerView] bounds];

    presentedViewFrame.size = [self
sizeForChildContentContainer:(UIViewController<UIContentContainer> *)[self
presentedViewController]

 withParentContainerSize:containerBounds.size];

    presentedViewFrame.origin.x = containerBounds.size.width -
presentedViewFrame.size.width;
    NSLog(@"presentedViewFrame: %@",
NSStringFromCGRect(presentedViewFrame));
    return presentedViewFrame;

}


- (CGSize)sizeForChildContentContainer:(id <UIContentContainer>)container
withParentContainerSize:(CGSize)parentSize
{
    return CGSizeMake(floorf(parentSize.width / 3.0),
                      parentSize.height);
}


On Wed, Jan 28, 2015 at 7:20 PM, Mazzaroth M. <email@hidden> wrote:

> I want to have a custom `modal` appear over the Master portion of a
> UISplitViewController. So far, I've managed to cobble together a
> UIViewControllerTransitioningDelegate, a UIPresentationController subclass.
>
>     chartSummaryNavigationController.transitioningDelegate =
> _transitioningDelegate;
>     [self presentViewController:chartSummaryNavigationController
> animated:YES completion:NULL];
>
> in the UIPresentationViewController subclass, I override
>
> -frameOfPresentedViewInContainerView
>     and
> -sizeForChildContentContainer:withParentContainerSize:
>
> so far. Just hoping to get it `working` and in
> -sizeForChildContentContainer:withParentContainerSize: return a smaller
> width than the landscape iPad. Voila, the modal does a standard
> presentation transition from the bottom of the screen. However, tapping
> anywhere around the presented modal results in no events, which is what I
> actually want. In -frameOfPresentedViewInContainerView I noticed that
> self.containerView.frame returns a frame the size of the entire iPad. Is
> that why I get no events around the presentedViewController? If so, how do
> I reduce the frame of self.containerView to match that of the presented
> controller?
>
> If that's not the problem, is there another way to allow tap events
> outside a presented view controller?
>
> Michael
>
>
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Allow tap events outside a custom UIPresentationController on iPad(iOS 8)
      • From: Mike Abdullah <email@hidden>
References: 
 >Allow tap events outside a custom UIPresentationController on iPad(iOS 8) (From: "Mazzaroth M." <email@hidden>)

  • Prev by Date: Re: How to wire up document exporting?
  • Next by Date: Re: NSString stringByAbbreviatingWithTildeInPath and Sandboxing
  • Previous by thread: Allow tap events outside a custom UIPresentationController on iPad(iOS 8)
  • Next by thread: Re: Allow tap events outside a custom UIPresentationController on iPad(iOS 8)
  • Index(es):
    • Date
    • Thread