I have two views in my view controller.At one time i am showing just on view & on that view i am loading some images from server.I have given an arrow to view next view on right side.When i touch arrow icon then my first view is hide & second view is shown with a slide animation.
code for slide animation
CGFloat screenWidth=self.view.frame.size.width-68.0;
[self.back_view setHidden:false];
[self.front_view setHidden:true];
[UIView animateWithDuration:0.5 animations:^{
self.front_view.frame = CGRectOffset(self.front_view.frame, -screenWidth, 0.0);
self.back_view.frame = CGRectOffset(self.back_view.frame, -screenWidth, 0.0);
}];
CGFloat screenWidth=self.view.frame.size.width-68.0;
[self.back_view setHidden:true];
[self.front_view setHidden:false];
[UIView animateWithDuration:0.5 animations:^{
self.front_view.frame = CGRectOffset(self.front_view.frame, screenWidth, 0.0);
self.back_view.frame = CGRectOffset(self.back_view.frame, screenWidth, 0.0);
}];
so if the images are loading from network & i try to move the view then animation does not work properly my view is hidden & second view is not shown.But if the image loading works just fine.So what could be issue for which slide does not work properly?
Aucun commentaire:
Enregistrer un commentaire