-1

in my main view controller the button action is

-(IBAction)ChangeImage
        {

        UIImage *guns = [UIImage imageNamed:@"guns.png"]; // load our image resource
        imageView = [[UIImageView alloc] initWithImage:guns];

            NSLog(@"kaam hua..??");
            [self.view addSubview:imageView];

            [UIView transitionFromView:self.view
                                toView:imageView
                              duration:3.0f

             options:UIViewAnimationOptionTransitionCrossDissolve
                            completion:nil];

                                NSLog(@"hfhjlkhbjhdfcvkbjnlkhgj");
     }
  1. i want to view the animation in slide view
  2. is there any method to do this
  3. can i chnage the UIViewAnimationOptionTransitionCrossDissolve to another one to show slide view
Sport
  • 8,570
  • 6
  • 46
  • 65
MeghaJain
  • 164
  • 1
  • 1
  • 8

1 Answers1

0

You can use UIViewAnimationOptionCurveEaseIn in animation option,

Try this,

CGRect or=self.view.frame;

CGRect basketTopFrame = self.view.frame;
basketTopFrame.origin.x =  basketTopFrame.size.width;

self.view.frame = basketTopFrame;

[UIView animateWithDuration:0.2
                      delay:0.0
                    options: UIViewAnimationOptionCurveEaseIn
                 animations:^{

                          [self.view addSubview:imageView];

                 }
                 completion:^(BOOL finished){
                     NSLog(@"Done!");
                 }];
Toseef Khilji
  • 17,192
  • 12
  • 80
  • 121