Image, View or ImageView show in big frame with Animation

UIImage, UIImageView, UIView

  UIImage *img = [UIImage imageNamed:@”funny-love.jpg”];

    UIImageView *imgVw = [[UIImageView alloc]init];

    imgVw.frame = CGRectMake(100, 100, 100, 100);

    imgVw.image = img;

    [self.view addSubview:imgVw];

    

    [UIView animateWithDuration:1.0

                          delay:0

                        options:(UIViewAnimationOptionAllowUserInteraction)

                     animations:^{

                         NSLog(@”animation start”);

                         imgVw.frame = CGRectMake(100, 100, imgVw.frame.size.width, imgVw.frame.size.height);

                         [self.view bringSubviewToFront:imgVw];

                     }

                     completion:^(BOOL finished){

                         NSLog(@”animation end”);

                         // [cell setBackgroundColor:[UIColor whiteColor]];

                         

                     }

     ];

Leave a comment