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. <taomaili...@gmail.com> 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 (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to