diff --git a/DeformationButton.podspec b/DeformationButton.podspec new file mode 100644 index 0000000..0de223d --- /dev/null +++ b/DeformationButton.podspec @@ -0,0 +1,15 @@ +#DeformationButton.podspec +Pod::Spec.new do |s| + s.name = "DeformationButton" + s.version = "1.0" + s.summary = "a light weight and easy to use tableview slide effect." + + s.homepage = "https://github.com/becomedragon/CXLSlideList" + s.license = 'MIT' + s.author = { "Becomedragon Cheng" => "becomedragonlong@gmail.com" } + s.platform = :ios, "7.0" + s.ios.deployment_target = "7.0" + s.source = { :git => "https://github.com/becomedragon/CXLSlideList.git", :tag => s.version} + s.source_files = 'CXLSlideList/CXLSlideList/*.{h,m}' + s.requires_arc = true +end \ No newline at end of file diff --git a/DeformationButton.xcodeproj/project.pbxproj b/DeformationButton.xcodeproj/project.pbxproj index ac541f8..c7547aa 100644 --- a/DeformationButton.xcodeproj/project.pbxproj +++ b/DeformationButton.xcodeproj/project.pbxproj @@ -388,6 +388,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = DeformationButton/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; }; @@ -398,6 +399,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = DeformationButton/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 7.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_NAME = "$(TARGET_NAME)"; }; diff --git a/DeformationButton/DeformationButton/DeformationButton.m b/DeformationButton/DeformationButton/DeformationButton.m index fadd302..335cad0 100644 --- a/DeformationButton/DeformationButton/DeformationButton.m +++ b/DeformationButton/DeformationButton/DeformationButton.m @@ -28,7 +28,6 @@ - (instancetype)initWithFrame:(CGRect)frame withColor:(UIColor*)color -(CGRect)frame{ CGRect frame = [super frame]; -// CGRectMake((SELF_WIDTH-286)/2+146, SELF_HEIGHT-84, 140, 36) self.forDisplayButton.frame = frame; return frame; } @@ -53,12 +52,16 @@ - (UIImage*)imageWithColor:(UIColor*)color cornerRadius:(CGFloat)cornerRadius{ } - (void)initSettingWithColor:(UIColor*)color{ + self.clipsToBounds = NO; + self.layer.masksToBounds = NO; + scale = 1.2; bgView = [[UIView alloc]initWithFrame:self.bounds]; bgView.backgroundColor = color; bgView.userInteractionEnabled = NO; bgView.hidden = YES; bgView.layer.cornerRadius = 3; + bgView.layer.masksToBounds = NO; [self addSubview:bgView]; defaultW = bgView.frame.size.width;