Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UIImageView *view ;
- . . .
- view.frame = rect ;
- view.image = image ;
- [iview1 removeFromSuperview] ;
- iview1.hidden = NO ;
- iview1.image = 0 ;
- [UIView animateWithDuration:5 animations:
- ^{
- scrollview.contentOffset = offset ;
- iview2.frame = rect ;
- } completion:^(BOOL finished) {
- iview2.image = image ;
- [scrollview addSubview:iview2] ;
- iview2.alpha = 1.0 ;
- }];
- UIImageView* view;
- ...
- view.alpha = 0.0f;
- UIView animateWithDuration:0.2 animations:^{
- view.frame = rect;
- view.image = image;
- }completion:^(BOOL finished){
- view.alpha = 1.0f;
- }
- [iview1 removeFromSuperview] ;
- iview1.hidden = YES;
- iview1.image = nil ;
- [scrollview addSubview:iview2];
- iview2.alpha = 0;
- iview2.image = image ; //you could make this assignment in the completion block as well
- [UIView animateWithDuration:5 animations:
- ^{
- scrollview.contentOffset = offset ;
- iview2.frame = rect ;
- } completion:^(BOOL finished) {
- iview2.alpha = 1.0 ;
- }];
- [iview1 removeFromSuperview];
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(NSEC_PER_SEC * 0.001)), dispatch_get_main_queue(), ^{
- [UIView animateWithDuration:5 animations:^{
- scrollview.contentOffset = offset;
- } completion:^(BOOL finished) {
- dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(NSEC_PER_SEC * 0.001)), dispatch_get_main_queue(), ^{
- iview2.frame = rect;
- iview2.image = image;
- [scrollview addSubview:iview2];
- });
- }];
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement