Skip to content
This repository has been archived by the owner on Nov 27, 2018. It is now read-only.

Commit

Permalink
Fix iOS 7.1 / Add podspec
Browse files Browse the repository at this point in the history
  • Loading branch information
VivienCormier committed Mar 24, 2014
1 parent f938a50 commit 27ec4d4
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 25 deletions.
Expand Up @@ -26,14 +26,10 @@ - (void)viewDidLoad
//
self.myImage = [[UIImageViewModeScaleAspect alloc]initWithFrame:CGRectMake(0, 100, 200, 100)];
self.myImage.contentMode = UIViewContentModeScaleAspectFill; // Add the first contentMode
self.myImage.image = [UIImage imageNamed:@"becomeapanda_tumblr_com_portrait"];
self.myImage.image = [UIImage imageNamed:@"becomeapanda_tumblr_com"];
self.myImage.backgroundColor = [UIColor blackColor];
[self.view addSubview:_myImage];

//
// New : use to get the UIImage use [self.myImage getImage] instead of [self.myImage image]
//

UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(animateImage)];
[self.view addGestureRecognizer:tap];
}
Expand Down
4 changes: 2 additions & 2 deletions UIImageViewModeScaleAspect.podspec
@@ -1,10 +1,10 @@
Pod::Spec.new do |s|
s.name = 'UIImageViewModeScaleAspect'
s.version = '1.2'
s.version = '1.3'
s.summary = 'Create animation of a UIImageView between twice contentMode ( UIViewContentModeScaleAspectFill / UIViewContentModeScaleAspectFit ).'
s.homepage = "https://github.com/VivienCormier/UIImageViewModeScaleAspect"
s.author = {'Vivien Cormier' => 'vivien.cormier@gmail.com'}
s.source = {:git => 'https://github.com/VivienCormier/UIImageViewModeScaleAspect.git', :tag => '1.2'}
s.source = {:git => 'https://github.com/VivienCormier/UIImageViewModeScaleAspect.git', :tag => '1.3'}
s.platform = :ios, '5.0'
s.source_files = 'UIImageViewModeScaleAspect/UIImageViewModeScaleAspect.{h,m}'
s.license = 'MIT'
Expand Down
9 changes: 3 additions & 6 deletions UIImageViewModeScaleAspect/UIImageViewModeScaleAspect.h
Expand Up @@ -9,7 +9,9 @@

#import <UIKit/UIKit.h>

@interface UIImageViewModeScaleAspect : UIImageView
@interface UIImageViewModeScaleAspect : UIView

@property(nonatomic, strong) UIImage *image;

#pragma mark - Automatic Animate

Expand Down Expand Up @@ -103,9 +105,4 @@
*/
- (void)animateFinishToScaleAspectFill;


- (UIImage *)getImage;

- (UIImage *)image __attribute((deprecated("use getImage method")));

@end
13 changes: 1 addition & 12 deletions UIImageViewModeScaleAspect/UIImageViewModeScaleAspect.m
Expand Up @@ -19,8 +19,6 @@ @interface UIImageViewModeScaleAspect ()

@implementation UIImageViewModeScaleAspect

@synthesize image = _image;

#pragma mark - Lifecycle

/**
Expand Down Expand Up @@ -275,14 +273,6 @@ - (void)animateFinishToScaleAspectFill{

}

#pragma mark - Getter

- (UIImage *)getImage{

return _img.image;

}

#pragma mark - Rewrite Setter / Getter

- (void)setImage:(UIImage *)image{
Expand All @@ -293,9 +283,8 @@ - (void)setImage:(UIImage *)image{

- (UIImage *)image{

// If you want the UIImage use "getImage"
return _img.image;

return nil;
}

- (void)setContentMode:(UIViewContentMode)contentMode{
Expand Down

0 comments on commit 27ec4d4

Please sign in to comment.