From 0ae8c2c404b036413274bc017d9b09fe7143793e Mon Sep 17 00:00:00 2001 From: aiXing <862099730@qq.com> Date: Mon, 13 Jun 2016 20:18:42 +0800 Subject: [PATCH] Bug fixs. --- AXAttributedLabel.podspec | 4 ++-- .../AXAttributedLabel/AXAttributedLabel.m | 24 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/AXAttributedLabel.podspec b/AXAttributedLabel.podspec index b595d02..cf15c53 100644 --- a/AXAttributedLabel.podspec +++ b/AXAttributedLabel.podspec @@ -2,7 +2,7 @@ Pod::Spec.new do |s| s.name = "AXAttributedLabel" -s.version = "0.2.4" +s.version = "0.2.5" s.summary = "`AXAttributedLabel` is an iOS customizable attributed label that displays attributed text." s.description = <<-DESC @@ -21,7 +21,7 @@ s.platform = :ios, "7.0" # s.ios.deployment_target = “7.0” # s.osx.deployment_target = "10.7" # s.watchos.deployment_target = "2.0" -s.source = { :git => "https://github.com/devedbox/AXAttributedLabel.git", :tag => "0.2.4" } +s.source = { :git => "https://github.com/devedbox/AXAttributedLabel.git", :tag => "0.2.5" } s.source_files = "AXAttributedLabel/AXAttributedLabel/*.{h,m}" #s.exclude_files = "Classes/Exclude" # s.public_header_files = "Classes/**/*.h" diff --git a/AXAttributedLabel/AXAttributedLabel/AXAttributedLabel.m b/AXAttributedLabel/AXAttributedLabel/AXAttributedLabel.m index f566900..8d5df04 100644 --- a/AXAttributedLabel/AXAttributedLabel/AXAttributedLabel.m +++ b/AXAttributedLabel/AXAttributedLabel/AXAttributedLabel.m @@ -655,7 +655,7 @@ - (void)setExclusionViews:(NSArray *)exclusionViews { } for (UIView *view in _exclusionViews) { CGRect frame = view.frame; - frame.origin.x += self.textContainerInset.left-5; + frame.origin.x += self.textContainerInset.left; frame.origin.y += self.textContainerInset.top; UIBezierPath *bezier = [UIBezierPath bezierPathWithRoundedRect:view.frame cornerRadius:view.layer.cornerRadius]; [exclusionPaths addObject:bezier]; @@ -663,17 +663,17 @@ - (void)setExclusionViews:(NSArray *)exclusionViews { [_textContainerView addSubview:view]; view.userInteractionEnabled = YES; #if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_9_0 - if ([[[UIDevice currentDevice] systemVersion] intValue]>=9) { - UIViewController *viewController = nil; - id nextResponsder = self.nextResponder; - while (![nextResponsder isKindOfClass:[UIViewController class]]) { - nextResponsder = [nextResponsder nextResponder]; - } - viewController = nextResponsder; - if (viewController) { - [viewController registerForPreviewingWithDelegate:self sourceView:view]; - } - } +// if ([[[UIDevice currentDevice] systemVersion] intValue]>=9) { +// UIViewController *viewController = nil; +// id nextResponsder = self.nextResponder; +// while (![nextResponsder isKindOfClass:[UIViewController class]]) { +// nextResponsder = [nextResponsder nextResponder]; +// } +// viewController = nextResponsder; +// if (viewController) { +// [viewController registerForPreviewingWithDelegate:self sourceView:view]; +// } +// } #endif } [self setExclusionPaths:exclusionPaths];