Permalink
Browse files

Merge pull request #14 from dnalot/patch-1

Drop iOS 3.2 support
  • Loading branch information...
2 parents 23acbe2 + 7951112 commit 3e4c67392172d20f35a1989ab8eb4072334a57c7 @AlexDenisov committed Jan 5, 2013
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
s.license = 'MIT'
s.author = { 'Alex Denisov' => '1101.debian@gmail.com' }
s.source = { :git => 'https://github.com/AlexDenisov/FontasticIcons.git', :tag => "#{s.version}" }
- s.platform = :ios, '3.2'
+ s.platform = :ios, '4.0'
s.source_files = 'FontasticIcons/Sources/Classes'
s.resources = 'FontasticIcons/Sources/Resources/Fonts/*'
s.frameworks = 'CoreText', 'QuartzCore'
@@ -36,20 +36,18 @@ - (void)setIcon:(FIIcon *)icon withContentsScale:(CGFloat)contentsScale {
if (font != [[_icon.class metaFont] fontRef] || ![icon.iconString isEqualToString:_icon.iconString]) {
_icon = icon.copy;
[self setIconAttribute:kCTFontAttributeName value:font];
-#if __IPHONE_OS_VERSION_MIN_REQUIRED > __IPHONE_4_0
// necessary for retina: http://markpospesel.wordpress.com/2012/07/10/on-the-importance-of-setting-contentsscale-in-catextlayer/
// but UIView overrides initialized value: http://stackoverflow.com/a/9479176/672921
// and setting during rendering or overriding property are both inflexible and ineffective
- self.contentsScale = contentsScale;
-#endif
+ self.contentsScale = contentsScale ? : [UIScreen mainScreen].scale;
}
}
#pragma mark self <FIIconRendering>
@synthesize icon = _icon, iconColor = _iconColor, inset = _inset;
- (void)setIcon:(FIIcon *)icon {
- [self setIcon:icon withContentsScale:[UIScreen mainScreen].scale];
+ [self setIcon:icon withContentsScale:0];
}
- (void)setIconColor:(UIColor *)iconColor {
@@ -49,12 +49,10 @@ - (FIFont *)fontForClass:(Class)aClass {
}
- (Class)iconClassForFontName:(NSString *)aName {
-#if __IPHONE_OS_VERSION_MIN_REQUIRED > __IPHONE_4_0
static dispatch_once_t once[1];
dispatch_once(once, ^{
[FIIcon bundledFonts]; // initialize provided implementations
});
-#endif
return [self->iconClasses valueForKey:aName];
}

0 comments on commit 3e4c673

Please sign in to comment.