ios/iosremote/iosremote.xcodeproj/project.pbxproj      |    6 +++
 ios/iosremote/iosremote/Communication/SlideShow.m      |    6 +--
 ios/iosremote/iosremote/UIImageView+setImageAnimated.h |   16 ++++++++
 ios/iosremote/iosremote/UIImageView+setImageAnimated.m |   31 +++++++++++++++++
 4 files changed, 56 insertions(+), 3 deletions(-)

New commits:
commit abfddb389930ef7ea80e33f22e48342e0c8ef473
Author: Siqi LIU <m...@siqi.fr>
Date:   Wed Jul 31 15:13:11 2013 +0200

    add category for imageView disolve transition
    
    Change-Id: I25ca4ab5d69b129e08544a27d4d27f7cde90baed

diff --git a/ios/iosremote/iosremote.xcodeproj/project.pbxproj 
b/ios/iosremote/iosremote.xcodeproj/project.pbxproj
index 3d3ee78..9baef73 100644
--- a/ios/iosremote/iosremote.xcodeproj/project.pbxproj
+++ b/ios/iosremote/iosremote.xcodeproj/project.pbxproj
@@ -51,6 +51,7 @@
                57DF0A85178FFFAB008B2D3D /* iPhone_autosize.storyboard in 
Resources */ = {isa = PBXBuildFile; fileRef = 57DF0A83178FFFAB008B2D3D /* 
iPhone_autosize.storyboard */; };
                57FE71E31785C61400B50125 /* pinValidation_vc.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 57FE71E21785C61400B50125 /* pinValidation_vc.m 
*/; };
                57FE71E917861A9000B50125 /* slideShowPreviewTable_vc.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 57FE71E817861A9000B50125 /* 
slideShowPreviewTable_vc.m */; };
+               8C0323AB17A943720037432E /* UIImageView+setImageAnimated.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 8C0323AA17A943720037432E /* 
UIImageView+setImageAnimated.m */; };
                8C0DC83A17A4177C0099E5AE /* nextButton_pressed.png in Resources 
*/ = {isa = PBXBuildFile; fileRef = 8C0DC83617A4177C0099E5AE /* 
nextButton_pressed.png */; };
                8C0DC83B17A4177C0099E5AE /* nextbutton_pres...@2x.png in 
Resources */ = {isa = PBXBuildFile; fileRef = 8C0DC83717A4177C0099E5AE /* 
nextbutton_pres...@2x.png */; };
                8C0DC83C17A4177C0099E5AE /* previousButton_pressed.png in 
Resources */ = {isa = PBXBuildFile; fileRef = 8C0DC83817A4177C0099E5AE /* 
previousButton_pressed.png */; };
@@ -151,6 +152,8 @@
                57FE71E21785C61400B50125 /* pinValidation_vc.m */ = {isa = 
PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name 
= pinValidation_vc.m; path = iosremote/Communication/pinValidation_vc.m; 
sourceTree = "<group>"; };
                57FE71E717861A9000B50125 /* slideShowPreviewTable_vc.h */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
path = slideShowPreviewTable_vc.h; sourceTree = "<group>"; };
                57FE71E817861A9000B50125 /* slideShowPreviewTable_vc.m */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; path = slideShowPreviewTable_vc.m; sourceTree = "<group>"; };
+               8C0323A917A943720037432E /* UIImageView+setImageAnimated.h */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; 
name = "UIImageView+setImageAnimated.h"; path = 
"iosremote/UIImageView+setImageAnimated.h"; sourceTree = "<group>"; };
+               8C0323AA17A943720037432E /* UIImageView+setImageAnimated.m */ = 
{isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; name = "UIImageView+setImageAnimated.m"; path = 
"iosremote/UIImageView+setImageAnimated.m"; sourceTree = "<group>"; };
                8C0DC83617A4177C0099E5AE /* nextButton_pressed.png */ = {isa = 
PBXFileReference; lastKnownFileType = image.png; path = nextButton_pressed.png; 
sourceTree = "<group>"; };
                8C0DC83717A4177C0099E5AE /* nextbutton_pres...@2x.png */ = {isa 
= PBXFileReference; lastKnownFileType = image.png; path = 
"nextbutton_pres...@2x.png"; sourceTree = "<group>"; };
                8C0DC83817A4177C0099E5AE /* previousButton_pressed.png */ = 
{isa = PBXFileReference; lastKnownFileType = image.png; path = 
previousButton_pressed.png; sourceTree = "<group>"; };
@@ -419,6 +422,8 @@
                                8C26E5CF17A58703007DA4B7 /* 
HorizontalSlideCell.m */,
                                8C26E5D517A68154007DA4B7 /* stopWatch.h */,
                                8C26E5D617A68154007DA4B7 /* stopWatch.m */,
+                               8C0323A917A943720037432E /* 
UIImageView+setImageAnimated.h */,
+                               8C0323AA17A943720037432E /* 
UIImageView+setImageAnimated.m */,
                        );
                        name = Support;
                        sourceTree = "<group>";
@@ -635,6 +640,7 @@
                                8C26E5C917A5731D007DA4B7 /* 
autoDismissKeyboardNavigationViewController.m in Sources */,
                                8C26E5D017A58703007DA4B7 /* 
HorizontalSlideCell.m in Sources */,
                                8C26E5D717A68154007DA4B7 /* stopWatch.m in 
Sources */,
+                               8C0323AB17A943720037432E /* 
UIImageView+setImageAnimated.m in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
diff --git a/ios/iosremote/iosremote/Communication/SlideShow.m 
b/ios/iosremote/iosremote/Communication/SlideShow.m
index 40393c3..d6f675d 100644
--- a/ios/iosremote/iosremote/Communication/SlideShow.m
+++ b/ios/iosremote/iosremote/Communication/SlideShow.m
@@ -10,6 +10,7 @@
 #import "SlideShow.h"
 #import "Base64.h"
 #import "slideShow_vc_iphone.h"
+#import "UIImageView+setImageAnimated.h"
 #import <dispatch/dispatch.h>
 
 @interface SlideShow()
@@ -90,7 +91,7 @@ NSLock *dictLock;
 //                                                                          
image = [image resizedImage:view.frame.size 
interpolationQuality:kCGInterpolationDefault];
                                                                           
dispatch_async(dispatch_get_main_queue(), ^{
                                                                               
NSLog(@"Setting image to tag: %ld", (long)[tag integerValue]);
-                                                                             
[(UIImageView *)view setImage:image];
+                                                                             
[(UIImageView *)view setImage:image animated:YES];
                                                                           });
                                                                           
[self.loadBuffer removeObjectForKey:tag];
                                                                       }
@@ -108,9 +109,8 @@ NSLock *dictLock;
                                                                       UIImage 
*image = [self.imagesDictionary objectForKey:[self.loadBuffer 
objectForKey:tag]];
                                                                       if 
(image){
                                                                           
UIImageView *imageView = (UIImageView *)[view viewWithTag:1];
-//                                                                          
image = [image resizedImage:imageView.frame.size 
interpolationQuality:kCGInterpolationDefault];
                                                                           
dispatch_async(dispatch_get_main_queue(), ^{
-                                                                              
[imageView setImage:image];
+                                                                              
[imageView setImage:image animated:YES];
                                                                           });
                                                                           
[self.loadBuffer removeObjectForKey:tag];
                                                                       }
diff --git a/ios/iosremote/iosremote/UIImageView+setImageAnimated.h 
b/ios/iosremote/iosremote/UIImageView+setImageAnimated.h
new file mode 100644
index 0000000..24f3b20
--- /dev/null
+++ b/ios/iosremote/iosremote/UIImageView+setImageAnimated.h
@@ -0,0 +1,16 @@
+//
+//  NSObject+UIImageView_setImageAnimated.h
+//  iosremote
+//
+//  Created by Siqi Liu on 7/31/13.
+//  Copyright (c) 2013 libreoffice. All rights reserved.
+//
+
+#import <Foundation/Foundation.h>
+
+@interface UIImageView (setImageAnimated)
+
+- (void) setImage:(UIImage *)image animated:(BOOL) animated 
Duration:(double)duration;
+- (void) setImage:(UIImage *)image animated:(BOOL) animated;
+
+@end
diff --git a/ios/iosremote/iosremote/UIImageView+setImageAnimated.m 
b/ios/iosremote/iosremote/UIImageView+setImageAnimated.m
new file mode 100644
index 0000000..47692f7
--- /dev/null
+++ b/ios/iosremote/iosremote/UIImageView+setImageAnimated.m
@@ -0,0 +1,31 @@
+//
+//  NSObject+UIImageView_setImageAnimated.m
+//  iosremote
+//
+//  Created by Siqi Liu on 7/31/13.
+//  Copyright (c) 2013 libreoffice. All rights reserved.
+//
+
+#import "UIImageView+setImageAnimated.h"
+
+@implementation UIImageView (setImageAnimated)
+
+- (void) setImage:(UIImage *)image animated:(BOOL) animated 
Duration:(double)duration
+{
+    if (animated) {
+        [UIView transitionWithView:self
+                          duration:duration
+                           options:UIViewAnimationOptionTransitionCrossDissolve
+                        animations:^{
+                            self.image = image;
+                        } completion:nil];
+    } else
+        [self setImage:image];
+}
+
+- (void) setImage:(UIImage *)image animated:(BOOL) animated
+{
+    [self setImage:image animated:animated Duration:0.5];
+}
+
+@end
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to