Search code examples
iosipadtextviewdatadetectortypes

Make popup of dataDetectorTypes (Textview) in front


i have a line separator of master and detail view(ipad) and stay always appeared when touching a textview , is that a way to make always the popup in front ?thanks..


Solution

  • for that you have to Create one UIView & Use like ,

    //For Set Alert View

    [[self.view superView] bringSubviewToFront: YOurCreatedView];
    

    & for Dismiss Alert View

    [[self.view superView] sendSubviewToBack: YOurCreatedView];
    

    And For Animation Use below Method..

    [UIView animateWithDuration:0.25 animations:^{
            //     
        } completion:^(BOOL finished) {
            //
        }];
    

    or Below Method..

    CATransform3D transform3d = CATransform3DMakeScale(1.15, 1.15, 1.15);
    cell.layer.transform = transform3d;
    
    
    //4. Define the final state (After the animation) and commit the animation
    [UIView beginAnimations:@"translation" context:NULL];
    [UIView setAnimationDuration:0.8];
    
    [[self.view superView] bringSubviewToFront: YOurCreatedView];
    
    
    YOurCreatedView.alpha = 1;
    YOurCreatedView.layer.transform = CATransform3DIdentity;
    YOurCreatedView.layer.shadowOffset = CGSizeMake(0, 0);
    [UIView commitAnimations];