Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ashwinr87

macrumors member
Original poster
Mar 9, 2011
81
0
So, here is what I am doing...

I have a split view controller in my Ipad app, in which the detail views has subviews which are UITableView's. The functionality I am trying to implement is to get an info view at the same position of a subview when a button(info button) on the subview is pressed. I need to get this info view by animation and that animation is that when the info button is pressed, that subview alone would flip (UIAnimationOptionFlipFromRight) and the info view would show...

This is how I implement it -

Code:
-(void) showInfoView: (id)sender
{
    if (ovController == nil)

    {
        // Set a notification to dismiss it later

        [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(helpInfoDone:) name:@"closeMedicationHelpInfo"  object:nil];


        ovController = [[OverlayViewController alloc] initWithNibName:@"ViewViewController" bundle:[NSBundle mainBundle]];
        ovController.status = @"HelpInfo";
        ovController.podName = @"Medication";
        ovController.view.backgroundColor = [UIColor clearColor];


        [UIView transitionWithView:self.view duration:1
                           options:UIViewAnimationOptionTransitionFlipFromRight 
                        animations:^{
                            [self.view addSubview:ovController.view];
                            [self.view bringSubviewToFront:ovController.view];
                        } 
                        completion:nil];

    }
}

Here I am using ovController as a "container" and my info view is a subview to ovController.

Using the above piece of code, I am able to get the info view as the subview to the UITableView but press down and move my finger up, the info view also moves and part of the UITableView which is not covered by the info view is seen. I am unable to figure out why this happens because when I add the info view as the sub view, it should not allow me to perform any action on the UITableView which is below this subview and so it should not allow me to scroll up or down but that is what is happening here.

It would be great if someone could help me out in this. Also let me know if anyone feels I am unclear on my question.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.