Ios 弹出设备中不工作的视图

Ios 弹出设备中不工作的视图,ios,iphone,ios7,uiviewanimation,Ios,Iphone,Ios7,Uiviewanimation,我正在通过放大缩小效果显示弹出的视图。当我的应用程序在登录facebook后从safari返回时,我将显示该视图。这在模拟器中运行良好。但它在设备中不起作用。我正在用ipad检查那个东西。这是我的密码: [MyAppDelegate openSessionWithAllowLoginUI:YES completionBlock:^(BOOL result) { NSLog(@"Connecte via Joint Page Thank you"); if (result)

我正在通过放大缩小效果显示弹出的视图。当我的应用程序在登录facebook后从safari返回时,我将显示该视图。这在模拟器中运行良好。但它在设备中不起作用。我正在用ipad检查那个东西。这是我的密码:

    [MyAppDelegate openSessionWithAllowLoginUI:YES completionBlock:^(BOOL result) {
    NSLog(@"Connecte via Joint Page Thank you");
    if (result) {
        NSLog(@"%@  %d ", [[NSUserDefaults standardUserDefaults] dictionaryRepresentation],[[[NSUserDefaults standardUserDefaults] valueForKey:@"isSender"]boolValue]);
        if([[[NSUserDefaults standardUserDefaults] valueForKey:@"isSender"]boolValue]==0 && [[[NSUserDefaults standardUserDefaults] valueForKey:@"isServiceProvider"] boolValue]==0){
            lbl_register.font=[UIFont fontWithName:GZFont size:16];
            lbl_serviceProvider.font=[UIFont fontWithName:GZFont size:14];
            lbl_customer.font=[UIFont fontWithName:GZFont size:14];
        SelectionView.center=self.view.center;
            SelectionView.layer.borderColor=[[UIColor blackColor] CGColor];
            SelectionView.layer.borderWidth=1.0;
            SelectionView.layer.cornerRadius=5;
            SelectionView.layer.masksToBounds=YES;

            [UIView animateWithDuration:0.4 animations:^{
                SelectionView.transform = CGAffineTransformScale(CGAffineTransformIdentity, 1.1, 1.1);
            } completion:^(BOOL finished) {
                NSLog(@"popped");
                SelectionView.center=self.view.center;

                [UIView animateWithDuration:0.4 animations:^{
                    SelectionView.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0.95,0.95);
                } completion:^(BOOL finished) {
                   // self.view.userInteractionEnabled=NO;
                }];
            }];
            [self.view addSubview:SelectionView];
你试试这个代码

  explodedBackgroundView = [[UIView alloc] initWithFrame:self.view.bounds];


            explodedView = [[UIView alloc]init];
            explodedView.frame = CGRectMake(10, 10, 540, 120);


                     [explodedBackgroundView setFrame:self.view.bounds];
                        explodedView.center=CGPointMake(self.view.center.x, self.view.center.y);




            [explodedBackgroundView setBackgroundColor: [UIColor blackColor]];
            [explodedBackgroundView setAlpha: 0.5];
            [self.view addSubview:explodedBackgroundView];
            explodedView.layer.cornerRadius=20;
            explodedView.transform = CGAffineTransformMakeScale(0.1, 0.1);
            UIImageView *imageView=[[UIImageView alloc]initWithFrame:explodedView.bounds ];
            [explodedView addSubview:imageView]




            [self.view addSubview:explodedView];



            explodedView.transform = CGAffineTransformMakeScale(0.1, 0.1);
            [UIView animateWithDuration:0.2 delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{
                explodedView.transform = CGAffineTransformIdentity;
                            } completion:^(BOOL finished){
                        // do something once the animation finishes, put it here
                            }];
你试试这个代码

  explodedBackgroundView = [[UIView alloc] initWithFrame:self.view.bounds];


            explodedView = [[UIView alloc]init];
            explodedView.frame = CGRectMake(10, 10, 540, 120);


                     [explodedBackgroundView setFrame:self.view.bounds];
                        explodedView.center=CGPointMake(self.view.center.x, self.view.center.y);




            [explodedBackgroundView setBackgroundColor: [UIColor blackColor]];
            [explodedBackgroundView setAlpha: 0.5];
            [self.view addSubview:explodedBackgroundView];
            explodedView.layer.cornerRadius=20;
            explodedView.transform = CGAffineTransformMakeScale(0.1, 0.1);
            UIImageView *imageView=[[UIImageView alloc]initWithFrame:explodedView.bounds ];
            [explodedView addSubview:imageView]




            [self.view addSubview:explodedView];



            explodedView.transform = CGAffineTransformMakeScale(0.1, 0.1);
            [UIView animateWithDuration:0.2 delay:0 options:UIViewAnimationOptionCurveEaseOut animations:^{
                explodedView.transform = CGAffineTransformIdentity;
                            } completion:^(BOOL finished){
                        // do something once the animation finishes, put it here
                            }];