From c6121446feeeb947b51e4895bc7c395e44513345 Mon Sep 17 00:00:00 2001 From: ghostlord Date: Tue, 20 Aug 2019 19:14:09 +0800 Subject: [PATCH 1/7] [GL][support Swift 5.0] --- .../project.pbxproj | 9 +++--- .../xcshareddata/IDEWorkspaceChecks.plist | 8 +++++ .../DOFavoriteButton-DEMO/AppDelegate.swift | 3 +- .../ViewController.swift | 2 +- DOFavoriteButton/DOFavoriteButton.swift | 30 +++++++++---------- 5 files changed, 30 insertions(+), 22 deletions(-) create mode 100644 DOFavoriteButton-DEMO/DOFavoriteButton-DEMO.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO.xcodeproj/project.pbxproj b/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO.xcodeproj/project.pbxproj index 78be48a..176eda2 100644 --- a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO.xcodeproj/project.pbxproj +++ b/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO.xcodeproj/project.pbxproj @@ -221,6 +221,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, Base, ); @@ -325,7 +326,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -348,7 +349,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "co.devlog.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -453,7 +454,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "co.devlog.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -467,7 +468,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "co.devlog.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/AppDelegate.swift b/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/AppDelegate.swift index 3b5e0f9..90894d6 100644 --- a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/AppDelegate.swift +++ b/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/AppDelegate.swift @@ -14,8 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool { - // Override point for customization after application launch. + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { return true } diff --git a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/ViewController.swift b/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/ViewController.swift index 70c3acd..a525b57 100644 --- a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/ViewController.swift +++ b/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/ViewController.swift @@ -61,7 +61,7 @@ class ViewController: UIViewController { // Dispose of any resources that can be recreated. } - func tappedButton(sender: DOFavoriteButton) { + @objc func tappedButton(sender: DOFavoriteButton) { if sender.isSelected { sender.deselect() } else { diff --git a/DOFavoriteButton/DOFavoriteButton.swift b/DOFavoriteButton/DOFavoriteButton.swift index 47e6d9d..6a01e6b 100644 --- a/DOFavoriteButton/DOFavoriteButton.swift +++ b/DOFavoriteButton/DOFavoriteButton.swift @@ -124,11 +124,11 @@ open class DOFavoriteButton: UIButton { circleMask = CAShapeLayer() circleMask.bounds = imageFrame circleMask.position = imgCenterPoint - circleMask.fillRule = kCAFillRuleEvenOdd + circleMask.fillRule = CAShapeLayerFillRule.evenOdd circleShape.mask = circleMask let maskPath = UIBezierPath(rect: imageFrame) - maskPath.addArc(withCenter: imgCenterPoint, radius: 0.1, startAngle: CGFloat(0.0), endAngle: CGFloat(M_PI * 2), clockwise: true) + maskPath.addArc(withCenter: imgCenterPoint, radius: 0.1, startAngle: CGFloat(0.0), endAngle: CGFloat(Double.pi * 2), clockwise: true) circleMask.path = maskPath.cgPath //=============== @@ -150,12 +150,12 @@ open class DOFavoriteButton: UIButton { path.addLine(to: CGPoint(x: lineFrame.origin.x + lineFrame.width / 2, y: lineFrame.origin.y)) return path }() - line.lineCap = kCALineCapRound - line.lineJoin = kCALineJoinRound + line.lineCap = CAShapeLayerLineCap.round + line.lineJoin = CAShapeLayerLineJoin.round line.strokeStart = 0.0 line.strokeEnd = 0.0 line.opacity = 0.0 - line.transform = CATransform3DMakeRotation(CGFloat(M_PI) / 5 * (CGFloat(i) * 2 + 1), 0.0, 0.0, 1.0) + line.transform = CATransform3DMakeRotation(CGFloat(Double.pi) / 5 * (CGFloat(i) * 2 + 1), 0.0, 0.0, 1.0) self.layer.addSublayer(line) lines.append(line) } @@ -338,26 +338,26 @@ open class DOFavoriteButton: UIButton { //=============== // add target //=============== - self.addTarget(self, action: #selector(DOFavoriteButton.touchDown(_:)), for: UIControlEvents.touchDown) - self.addTarget(self, action: #selector(DOFavoriteButton.touchUpInside(_:)), for: UIControlEvents.touchUpInside) - self.addTarget(self, action: #selector(DOFavoriteButton.touchDragExit(_:)), for: UIControlEvents.touchDragExit) - self.addTarget(self, action: #selector(DOFavoriteButton.touchDragEnter(_:)), for: UIControlEvents.touchDragEnter) - self.addTarget(self, action: #selector(DOFavoriteButton.touchCancel(_:)), for: UIControlEvents.touchCancel) + self.addTarget(self, action: #selector(DOFavoriteButton.touchDown(_:)), for: .touchDown) + self.addTarget(self, action: #selector(DOFavoriteButton.touchUpInside(_:)), for: .touchUpInside) + self.addTarget(self, action: #selector(DOFavoriteButton.touchDragExit(_:)), for: .touchDragExit) + self.addTarget(self, action: #selector(DOFavoriteButton.touchDragEnter(_:)), for: .touchDragEnter) + self.addTarget(self, action: #selector(DOFavoriteButton.touchCancel(_:)), for: .touchCancel) } - func touchDown(_ sender: DOFavoriteButton) { + @objc func touchDown(_ sender: DOFavoriteButton) { self.layer.opacity = 0.4 } - func touchUpInside(_ sender: DOFavoriteButton) { + @objc func touchUpInside(_ sender: DOFavoriteButton) { self.layer.opacity = 1.0 } - func touchDragExit(_ sender: DOFavoriteButton) { + @objc func touchDragExit(_ sender: DOFavoriteButton) { self.layer.opacity = 1.0 } - func touchDragEnter(_ sender: DOFavoriteButton) { + @objc func touchDragEnter(_ sender: DOFavoriteButton) { self.layer.opacity = 0.4 } - func touchCancel(_ sender: DOFavoriteButton) { + @objc func touchCancel(_ sender: DOFavoriteButton) { self.layer.opacity = 1.0 } From b18bf3241f4e4257d12e78815efc12e68a93144d Mon Sep 17 00:00:00 2001 From: ghostlord Date: Tue, 20 Aug 2019 19:43:12 +0800 Subject: [PATCH 2/7] [GL][update pod] --- DOFavoriteButton.podspec | 12 ++++++------ README.md | 19 +++++++++++-------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/DOFavoriteButton.podspec b/DOFavoriteButton.podspec index c594f26..099feb3 100644 --- a/DOFavoriteButton.podspec +++ b/DOFavoriteButton.podspec @@ -1,14 +1,14 @@ Pod::Spec.new do |s| - s.name = "DOFavoriteButton" - s.version = "0.0.4" + s.name = "DOFavoriteButton-new" + s.version = "0.0.5" s.summary = "Cute Animated Button written in Swift. It could be just right for favorite buttons!" - s.homepage = "https://github.com/okmr-d/DOFavoriteButton" + s.homepage = "https://github.com/ghostlordstar/DOFavoriteButton.git" s.screenshots = "https://raw.githubusercontent.com/okmr-d/okmr-d.github.io/master/img/DOFavoriteButton/demo.gif" s.license = { :type => "MIT", :file => "LICENSE" } - s.author = { "Daiki Okumura" => "daiki.okumura@gmail.com" } - s.social_media_url = "http://twitter.com/okmr_d" + s.author = { "ghostlord" => "heshanzhang@outlook.com" } + s.social_media_url = "http://ghostlordstar.github.io" s.platform = :ios, "8.0" - s.source = { :git => "https://github.com/okmr-d/DOFavoriteButton.git", :tag => s.version.to_s } + s.source = { :git => "https://github.com/ghostlordstar/DOFavoriteButton.git", :tag => s.version.to_s } s.source_files = "DOFavoriteButton/*.swift" s.resources = "DOFavoriteButton/*.png" s.framework = "UIKit" diff --git a/README.md b/README.md index 4d402b7..6f389bc 100644 --- a/README.md +++ b/README.md @@ -1,28 +1,31 @@ # DOFavoriteButton [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -[![Version](https://img.shields.io/cocoapods/v/DOFavoriteButton.svg?style=flat)](http://cocoapods.org/pods/DOFavoriteButton) -[![Platform](https://img.shields.io/cocoapods/p/DOFavoriteButton.svg?style=flat)](http://cocoapods.org/pods/DOFavoriteButton) -[![License](https://img.shields.io/cocoapods/l/DOFavoriteButton.svg?style=flat)](https://github.com/okmr-d/DOFavoriteButton/blob/master/LICENSE) +[![Version](https://img.shields.io/cocoapods/v/DOFavoriteButton.svg?style=flat)](http://cocoapods.org/pods/DOFavoriteButton-new) +[![Platform](https://img.shields.io/cocoapods/p/DOFavoriteButton.svg?style=flat)](http://cocoapods.org/pods/DOFavoriteButton-new) +[![License](https://img.shields.io/cocoapods/l/DOFavoriteButton.svg?style=flat)](https://github.com/ghostlordstar/DOFavoriteButton/blob/master/LICENSE) Cute Animated Button written in Swift. It could be just right for favorite buttons! ![Demo](https://raw.githubusercontent.com/okmr-d/okmr-d.github.io/master/img/DOFavoriteButton/demo.gif) +## Statement +DOFavoriteButton-new is based on the [DOFavoriteButton](https://github.com/okmr-d/DOFavoriteButton). + ## Requirements -* iOS 7.0+ -* Swift 1.2 +* iOS 8.0+ +* Swift 5.0 ## Installation -#### Carthage + #### CocoaPods Add the following line to your `Podfile`: ``` -pod 'DOFavoriteButton' +pod 'DOFavoriteButton-new' ``` #### Manual From da46f4b49a5f050d225eb390c8bf0ac6fc52fc3d Mon Sep 17 00:00:00 2001 From: ghostlord Date: Tue, 20 Aug 2019 19:54:16 +0800 Subject: [PATCH 3/7] =?UTF-8?q?[GL][=E6=B7=BB=E5=8A=A0siwft=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E9=99=90=E5=88=B6]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DOFavoriteButton.podspec => DOFavoriteButton-new.podspec | 1 + 1 file changed, 1 insertion(+) rename DOFavoriteButton.podspec => DOFavoriteButton-new.podspec (96%) diff --git a/DOFavoriteButton.podspec b/DOFavoriteButton-new.podspec similarity index 96% rename from DOFavoriteButton.podspec rename to DOFavoriteButton-new.podspec index 099feb3..e5f1141 100644 --- a/DOFavoriteButton.podspec +++ b/DOFavoriteButton-new.podspec @@ -1,6 +1,7 @@ Pod::Spec.new do |s| s.name = "DOFavoriteButton-new" s.version = "0.0.5" + s.swift_versions = "5.0" s.summary = "Cute Animated Button written in Swift. It could be just right for favorite buttons!" s.homepage = "https://github.com/ghostlordstar/DOFavoriteButton.git" s.screenshots = "https://raw.githubusercontent.com/okmr-d/okmr-d.github.io/master/img/DOFavoriteButton/demo.gif" From 726857f96007ee2b28483e92b7d84ea92eb2df53 Mon Sep 17 00:00:00 2001 From: ghostlord Date: Tue, 20 Aug 2019 20:46:21 +0800 Subject: [PATCH 4/7] =?UTF-8?q?[GL][1.=E4=BF=AE=E6=94=B9pod=E5=BA=93?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=202.=E6=94=AF=E6=8C=81Carthage]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 49 +++++++++- .../contents.xcworkspacedata | 7 -- .../project.pbxproj | 84 ++++++++-------- .../contents.xcworkspacedata | 7 ++ .../xcshareddata/IDEWorkspaceChecks.plist | 0 .../DOFavoriteButtonNew-DEMO.xcscheme | 91 ++++++++++++++++++ .../xcschemes/DOFavoriteButtonNew.xcscheme | 20 ++-- .../AppDelegate.swift | 0 .../Base.lproj/LaunchScreen.xib | 16 ++- .../Base.lproj/Main.storyboard | 35 +++---- .../AppIcon.appiconset/Contents.json | 30 ++++++ .../Images.xcassets/Contents.json | 6 ++ .../heart.imageset/Contents.json | 0 .../Images.xcassets/heart.imageset/heart.png | Bin .../like.imageset/Contents.json | 0 .../Images.xcassets/like.imageset/like.png | Bin .../smile.imageset/Contents.json | 0 .../Images.xcassets/smile.imageset/smile.png | Bin .../star.imageset/Contents.json | 4 +- .../Images.xcassets/star.imageset/star.png | Bin .../DOFavoriteButtonNew-DEMO}/Info.plist | 0 .../ViewController.swift | 13 ++- .../DOFavoriteButtonNew/DOFavoriteButtonNew.h | 8 +- .../DOFavoriteButtonNew}/Info.plist | 2 +- ...new.podspec => DOFavoriteButtonNew.podspec | 4 +- .../DOFavoriteButtonNew.swift | 26 ++--- .../heart.png | Bin .../like.png | Bin .../smile.png | Bin .../star.png | Bin README.md | 28 +++--- 31 files changed, 296 insertions(+), 134 deletions(-) delete mode 100644 DOFavoriteButton-DEMO/DOFavoriteButton-DEMO.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename {DOFavoriteButton-DEMO/DOFavoriteButton-DEMO.xcodeproj => DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO.xcodeproj}/project.pbxproj (81%) create mode 100644 DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename {DOFavoriteButton-DEMO/DOFavoriteButton-DEMO.xcodeproj => DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO.xcodeproj}/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (100%) create mode 100644 DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO.xcodeproj/xcshareddata/xcschemes/DOFavoriteButtonNew-DEMO.xcscheme rename DOFavoriteButton-DEMO/DOFavoriteButton-DEMO.xcodeproj/xcshareddata/xcschemes/DOFavoriteButton.xcscheme => DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO.xcodeproj/xcshareddata/xcschemes/DOFavoriteButtonNew.xcscheme (82%) rename {DOFavoriteButton-DEMO/DOFavoriteButton-DEMO => DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO}/AppDelegate.swift (100%) rename {DOFavoriteButton-DEMO/DOFavoriteButton-DEMO => DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO}/Base.lproj/LaunchScreen.xib (78%) rename {DOFavoriteButton-DEMO/DOFavoriteButton-DEMO => DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO}/Base.lproj/Main.storyboard (76%) rename {DOFavoriteButton-DEMO/DOFavoriteButton-DEMO => DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO}/Images.xcassets/AppIcon.appiconset/Contents.json (67%) create mode 100644 DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Images.xcassets/Contents.json rename {DOFavoriteButton-DEMO/DOFavoriteButton-DEMO => DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO}/Images.xcassets/heart.imageset/Contents.json (100%) rename {DOFavoriteButton-DEMO/DOFavoriteButton-DEMO => DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO}/Images.xcassets/heart.imageset/heart.png (100%) rename {DOFavoriteButton-DEMO/DOFavoriteButton-DEMO => DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO}/Images.xcassets/like.imageset/Contents.json (100%) rename {DOFavoriteButton-DEMO/DOFavoriteButton-DEMO => DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO}/Images.xcassets/like.imageset/like.png (100%) rename {DOFavoriteButton-DEMO/DOFavoriteButton-DEMO => DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO}/Images.xcassets/smile.imageset/Contents.json (100%) rename {DOFavoriteButton-DEMO/DOFavoriteButton-DEMO => DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO}/Images.xcassets/smile.imageset/smile.png (100%) rename {DOFavoriteButton-DEMO/DOFavoriteButton-DEMO => DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO}/Images.xcassets/star.imageset/Contents.json (82%) rename {DOFavoriteButton-DEMO/DOFavoriteButton-DEMO => DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO}/Images.xcassets/star.imageset/star.png (100%) rename {DOFavoriteButton-DEMO/DOFavoriteButton-DEMO => DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO}/Info.plist (100%) rename {DOFavoriteButton-DEMO/DOFavoriteButton-DEMO => DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO}/ViewController.swift (80%) rename DOFavoriteButton-DEMO/DOFavoriteButton/DOFavoriteButton.h => DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew/DOFavoriteButtonNew.h (67%) rename {DOFavoriteButton-DEMO/DOFavoriteButton => DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew}/Info.plist (97%) rename DOFavoriteButton-new.podspec => DOFavoriteButtonNew.podspec (92%) rename DOFavoriteButton/DOFavoriteButton.swift => DOFavoriteButtonNew/DOFavoriteButtonNew.swift (94%) rename {DOFavoriteButton => DOFavoriteButtonNew}/heart.png (100%) rename {DOFavoriteButton => DOFavoriteButtonNew}/like.png (100%) rename {DOFavoriteButton => DOFavoriteButtonNew}/smile.png (100%) rename {DOFavoriteButton => DOFavoriteButtonNew}/star.png (100%) diff --git a/.gitignore b/.gitignore index 8615121..941528f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,12 @@ # Xcode # +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated build/ +DerivedData/ + +## Various settings *.pbxuser !default.pbxuser *.mode1v3 @@ -9,19 +15,40 @@ build/ !default.mode2v3 *.perspectivev3 !default.perspectivev3 -xcuserdata -*.xccheckout +xcuserdata/ + +## Other *.moved-aside -DerivedData +*.xccheckout +*.xcscmblueprint + +## Obj-C/Swift specific *.hmap *.ipa -*.xcuserstate +*.dSYM.zip +*.dSYM + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +# Package.pins +# Package.resolved +.build/ + +*.DS_Store +.idea/ +.vscode/ # CocoaPods # # We recommend against adding the Pods directory to your .gitignore. However # you should judge for yourself, the pros and cons are mentioned at: -# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control # # Pods/ @@ -31,3 +58,15 @@ DerivedData # Carthage/Checkouts Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/#source-control + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots/**/*.png +fastlane/test_output diff --git a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index f7ba619..0000000 --- a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO.xcodeproj/project.pbxproj b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO.xcodeproj/project.pbxproj similarity index 81% rename from DOFavoriteButton-DEMO/DOFavoriteButton-DEMO.xcodeproj/project.pbxproj rename to DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO.xcodeproj/project.pbxproj index 176eda2..8b0d705 100644 --- a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO.xcodeproj/project.pbxproj +++ b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO.xcodeproj/project.pbxproj @@ -7,15 +7,15 @@ objects = { /* Begin PBXBuildFile section */ - 4F6071201B6366ED0058F570 /* DOFavoriteButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F60711F1B6366ED0058F570 /* DOFavoriteButton.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4F60713C1B6367B00058F570 /* DOFavoriteButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F60713B1B6367B00058F570 /* DOFavoriteButton.swift */; }; + 0482A6B0230C1C5B00E84985 /* DOFavoriteButtonNew.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0482A6AF230C1C5B00E84985 /* DOFavoriteButtonNew.swift */; }; + 4F6071201B6366ED0058F570 /* DOFavoriteButtonNew.h in Headers */ = {isa = PBXBuildFile; fileRef = 4F60711F1B6366ED0058F570 /* DOFavoriteButtonNew.h */; settings = {ATTRIBUTES = (Public, ); }; }; 4FBAA7031B4D807F00C8657F /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FBAA7021B4D807F00C8657F /* AppDelegate.swift */; }; 4FBAA7051B4D807F00C8657F /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FBAA7041B4D807F00C8657F /* ViewController.swift */; }; 4FBAA7081B4D807F00C8657F /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4FBAA7061B4D807F00C8657F /* Main.storyboard */; }; 4FBAA70A1B4D807F00C8657F /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 4FBAA7091B4D807F00C8657F /* Images.xcassets */; }; 4FBAA70D1B4D807F00C8657F /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 4FBAA70B1B4D807F00C8657F /* LaunchScreen.xib */; }; - 74018BBB1D86F8CB00B1EC84 /* DOFavoriteButton.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F60711B1B6366ED0058F570 /* DOFavoriteButton.framework */; }; - 74018BBC1D86F8CB00B1EC84 /* DOFavoriteButton.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4F60711B1B6366ED0058F570 /* DOFavoriteButton.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 74018BBB1D86F8CB00B1EC84 /* DOFavoriteButtonNew.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4F60711B1B6366ED0058F570 /* DOFavoriteButtonNew.framework */; }; + 74018BBC1D86F8CB00B1EC84 /* DOFavoriteButtonNew.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 4F60711B1B6366ED0058F570 /* DOFavoriteButtonNew.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; /* End PBXBuildFile section */ /* Begin PBXBuildRule section */ @@ -47,7 +47,7 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( - 74018BBC1D86F8CB00B1EC84 /* DOFavoriteButton.framework in Embed Frameworks */, + 74018BBC1D86F8CB00B1EC84 /* DOFavoriteButtonNew.framework in Embed Frameworks */, ); name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; @@ -55,11 +55,11 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ - 4F60711B1B6366ED0058F570 /* DOFavoriteButton.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = DOFavoriteButton.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 0482A6AF230C1C5B00E84985 /* DOFavoriteButtonNew.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DOFavoriteButtonNew.swift; path = ../../DOFavoriteButtonNew/DOFavoriteButtonNew.swift; sourceTree = ""; }; + 4F60711B1B6366ED0058F570 /* DOFavoriteButtonNew.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = DOFavoriteButtonNew.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 4F60711E1B6366ED0058F570 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 4F60711F1B6366ED0058F570 /* DOFavoriteButton.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DOFavoriteButton.h; sourceTree = ""; }; - 4F60713B1B6367B00058F570 /* DOFavoriteButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = DOFavoriteButton.swift; path = ../../DOFavoriteButton/DOFavoriteButton.swift; sourceTree = ""; }; - 4FBAA6FD1B4D807F00C8657F /* DOFavoriteButton-DEMO.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "DOFavoriteButton-DEMO.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 4F60711F1B6366ED0058F570 /* DOFavoriteButtonNew.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DOFavoriteButtonNew.h; sourceTree = ""; }; + 4FBAA6FD1B4D807F00C8657F /* DOFavoriteButtonNew-DEMO.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "DOFavoriteButtonNew-DEMO.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 4FBAA7011B4D807F00C8657F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 4FBAA7021B4D807F00C8657F /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 4FBAA7041B4D807F00C8657F /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; @@ -80,21 +80,21 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 74018BBB1D86F8CB00B1EC84 /* DOFavoriteButton.framework in Frameworks */, + 74018BBB1D86F8CB00B1EC84 /* DOFavoriteButtonNew.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 4F60711C1B6366ED0058F570 /* DOFavoriteButton */ = { + 4F60711C1B6366ED0058F570 /* DOFavoriteButtonNew */ = { isa = PBXGroup; children = ( - 4F60713B1B6367B00058F570 /* DOFavoriteButton.swift */, - 4F60711F1B6366ED0058F570 /* DOFavoriteButton.h */, + 0482A6AF230C1C5B00E84985 /* DOFavoriteButtonNew.swift */, + 4F60711F1B6366ED0058F570 /* DOFavoriteButtonNew.h */, 4F60711D1B6366ED0058F570 /* Supporting Files */, ); - path = DOFavoriteButton; + path = DOFavoriteButtonNew; sourceTree = ""; }; 4F60711D1B6366ED0058F570 /* Supporting Files */ = { @@ -108,8 +108,8 @@ 4FBAA6F41B4D807F00C8657F = { isa = PBXGroup; children = ( - 4FBAA6FF1B4D807F00C8657F /* DOFavoriteButton-DEMO */, - 4F60711C1B6366ED0058F570 /* DOFavoriteButton */, + 4FBAA6FF1B4D807F00C8657F /* DOFavoriteButtonNew-DEMO */, + 4F60711C1B6366ED0058F570 /* DOFavoriteButtonNew */, 4FBAA6FE1B4D807F00C8657F /* Products */, ); sourceTree = ""; @@ -117,13 +117,13 @@ 4FBAA6FE1B4D807F00C8657F /* Products */ = { isa = PBXGroup; children = ( - 4FBAA6FD1B4D807F00C8657F /* DOFavoriteButton-DEMO.app */, - 4F60711B1B6366ED0058F570 /* DOFavoriteButton.framework */, + 4FBAA6FD1B4D807F00C8657F /* DOFavoriteButtonNew-DEMO.app */, + 4F60711B1B6366ED0058F570 /* DOFavoriteButtonNew.framework */, ); name = Products; sourceTree = ""; }; - 4FBAA6FF1B4D807F00C8657F /* DOFavoriteButton-DEMO */ = { + 4FBAA6FF1B4D807F00C8657F /* DOFavoriteButtonNew-DEMO */ = { isa = PBXGroup; children = ( 4FBAA7021B4D807F00C8657F /* AppDelegate.swift */, @@ -133,7 +133,7 @@ 4FBAA70B1B4D807F00C8657F /* LaunchScreen.xib */, 4FBAA7001B4D807F00C8657F /* Supporting Files */, ); - path = "DOFavoriteButton-DEMO"; + path = "DOFavoriteButtonNew-DEMO"; sourceTree = ""; }; 4FBAA7001B4D807F00C8657F /* Supporting Files */ = { @@ -151,16 +151,16 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 4F6071201B6366ED0058F570 /* DOFavoriteButton.h in Headers */, + 4F6071201B6366ED0058F570 /* DOFavoriteButtonNew.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 4F60711A1B6366ED0058F570 /* DOFavoriteButton */ = { + 4F60711A1B6366ED0058F570 /* DOFavoriteButtonNew */ = { isa = PBXNativeTarget; - buildConfigurationList = 4F6071341B6366ED0058F570 /* Build configuration list for PBXNativeTarget "DOFavoriteButton" */; + buildConfigurationList = 4F6071341B6366ED0058F570 /* Build configuration list for PBXNativeTarget "DOFavoriteButtonNew" */; buildPhases = ( 4F6071161B6366ED0058F570 /* Sources */, 4F6071171B6366ED0058F570 /* Frameworks */, @@ -172,14 +172,14 @@ ); dependencies = ( ); - name = DOFavoriteButton; + name = DOFavoriteButtonNew; productName = DOFavoriteButton; - productReference = 4F60711B1B6366ED0058F570 /* DOFavoriteButton.framework */; + productReference = 4F60711B1B6366ED0058F570 /* DOFavoriteButtonNew.framework */; productType = "com.apple.product-type.framework"; }; - 4FBAA6FC1B4D807F00C8657F /* DOFavoriteButton-DEMO */ = { + 4FBAA6FC1B4D807F00C8657F /* DOFavoriteButtonNew-DEMO */ = { isa = PBXNativeTarget; - buildConfigurationList = 4FBAA71C1B4D807F00C8657F /* Build configuration list for PBXNativeTarget "DOFavoriteButton-DEMO" */; + buildConfigurationList = 4FBAA71C1B4D807F00C8657F /* Build configuration list for PBXNativeTarget "DOFavoriteButtonNew-DEMO" */; buildPhases = ( 4FBAA6F91B4D807F00C8657F /* Sources */, 4FBAA6FA1B4D807F00C8657F /* Frameworks */, @@ -191,9 +191,9 @@ dependencies = ( 74018BBE1D86F8CB00B1EC84 /* PBXTargetDependency */, ); - name = "DOFavoriteButton-DEMO"; + name = "DOFavoriteButtonNew-DEMO"; productName = "DOFavoriteButton-DEMO"; - productReference = 4FBAA6FD1B4D807F00C8657F /* DOFavoriteButton-DEMO.app */; + productReference = 4FBAA6FD1B4D807F00C8657F /* DOFavoriteButtonNew-DEMO.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -209,14 +209,14 @@ TargetAttributes = { 4F60711A1B6366ED0058F570 = { CreatedOnToolsVersion = 6.4; - LastSwiftMigration = 0800; + LastSwiftMigration = 1030; }; 4FBAA6FC1B4D807F00C8657F = { CreatedOnToolsVersion = 6.4; }; }; }; - buildConfigurationList = 4FBAA6F81B4D807F00C8657F /* Build configuration list for PBXProject "DOFavoriteButton-DEMO" */; + buildConfigurationList = 4FBAA6F81B4D807F00C8657F /* Build configuration list for PBXProject "DOFavoriteButtonNew-DEMO" */; compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; @@ -230,8 +230,8 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 4FBAA6FC1B4D807F00C8657F /* DOFavoriteButton-DEMO */, - 4F60711A1B6366ED0058F570 /* DOFavoriteButton */, + 4FBAA6FC1B4D807F00C8657F /* DOFavoriteButtonNew-DEMO */, + 4F60711A1B6366ED0058F570 /* DOFavoriteButtonNew */, ); }; /* End PBXProject section */ @@ -261,7 +261,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 4F60713C1B6367B00058F570 /* DOFavoriteButton.swift in Sources */, + 0482A6B0230C1C5B00E84985 /* DOFavoriteButtonNew.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -279,7 +279,7 @@ /* Begin PBXTargetDependency section */ 74018BBE1D86F8CB00B1EC84 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 4F60711A1B6366ED0058F570 /* DOFavoriteButton */; + target = 4F60711A1B6366ED0058F570 /* DOFavoriteButtonNew */; targetProxy = 74018BBD1D86F8CB00B1EC84 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ @@ -318,7 +318,7 @@ "DEBUG=1", "$(inherited)", ); - INFOPLIST_FILE = DOFavoriteButton/Info.plist; + INFOPLIST_FILE = "$(SRCROOT)/DOFavoriteButtonNew/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; @@ -342,7 +342,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = DOFavoriteButton/Info.plist; + INFOPLIST_FILE = "$(SRCROOT)/DOFavoriteButtonNew/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; @@ -449,7 +449,7 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = "DOFavoriteButton-DEMO/Info.plist"; + INFOPLIST_FILE = "$(SRCROOT)/DOFavoriteButtonNew-DEMO/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "co.devlog.$(PRODUCT_NAME:rfc1034identifier)"; @@ -463,7 +463,7 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = "DOFavoriteButton-DEMO/Info.plist"; + INFOPLIST_FILE = "$(SRCROOT)/DOFavoriteButtonNew-DEMO/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "co.devlog.$(PRODUCT_NAME:rfc1034identifier)"; @@ -475,7 +475,7 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 4F6071341B6366ED0058F570 /* Build configuration list for PBXNativeTarget "DOFavoriteButton" */ = { + 4F6071341B6366ED0058F570 /* Build configuration list for PBXNativeTarget "DOFavoriteButtonNew" */ = { isa = XCConfigurationList; buildConfigurations = ( 4F6071351B6366ED0058F570 /* Debug */, @@ -484,7 +484,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 4FBAA6F81B4D807F00C8657F /* Build configuration list for PBXProject "DOFavoriteButton-DEMO" */ = { + 4FBAA6F81B4D807F00C8657F /* Build configuration list for PBXProject "DOFavoriteButtonNew-DEMO" */ = { isa = XCConfigurationList; buildConfigurations = ( 4FBAA71A1B4D807F00C8657F /* Debug */, @@ -493,7 +493,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 4FBAA71C1B4D807F00C8657F /* Build configuration list for PBXNativeTarget "DOFavoriteButton-DEMO" */ = { + 4FBAA71C1B4D807F00C8657F /* Build configuration list for PBXNativeTarget "DOFavoriteButtonNew-DEMO" */ = { isa = XCConfigurationList; buildConfigurations = ( 4FBAA71D1B4D807F00C8657F /* Debug */, diff --git a/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..4286d9f --- /dev/null +++ b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from DOFavoriteButton-DEMO/DOFavoriteButton-DEMO.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO.xcodeproj/xcshareddata/xcschemes/DOFavoriteButtonNew-DEMO.xcscheme b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO.xcodeproj/xcshareddata/xcschemes/DOFavoriteButtonNew-DEMO.xcscheme new file mode 100644 index 0000000..4ad32d4 --- /dev/null +++ b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO.xcodeproj/xcshareddata/xcschemes/DOFavoriteButtonNew-DEMO.xcscheme @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO.xcodeproj/xcshareddata/xcschemes/DOFavoriteButton.xcscheme b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO.xcodeproj/xcshareddata/xcschemes/DOFavoriteButtonNew.xcscheme similarity index 82% rename from DOFavoriteButton-DEMO/DOFavoriteButton-DEMO.xcodeproj/xcshareddata/xcschemes/DOFavoriteButton.xcscheme rename to DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO.xcodeproj/xcshareddata/xcschemes/DOFavoriteButtonNew.xcscheme index f5b5fb5..3f799f3 100644 --- a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO.xcodeproj/xcshareddata/xcschemes/DOFavoriteButton.xcscheme +++ b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO.xcodeproj/xcshareddata/xcschemes/DOFavoriteButtonNew.xcscheme @@ -1,6 +1,6 @@ + BuildableName = "DOFavoriteButtonNew.framework" + BlueprintName = "DOFavoriteButtonNew" + ReferencedContainer = "container:DOFavoriteButtonNew-DEMO.xcodeproj"> @@ -46,9 +46,9 @@ + BuildableName = "DOFavoriteButtonNew.framework" + BlueprintName = "DOFavoriteButtonNew" + ReferencedContainer = "container:DOFavoriteButtonNew-DEMO.xcodeproj"> @@ -64,9 +64,9 @@ + BuildableName = "DOFavoriteButtonNew.framework" + BlueprintName = "DOFavoriteButtonNew" + ReferencedContainer = "container:DOFavoriteButtonNew-DEMO.xcodeproj"> diff --git a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/AppDelegate.swift b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/AppDelegate.swift similarity index 100% rename from DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/AppDelegate.swift rename to DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/AppDelegate.swift diff --git a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/Base.lproj/LaunchScreen.xib b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Base.lproj/LaunchScreen.xib similarity index 78% rename from DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/Base.lproj/LaunchScreen.xib rename to DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Base.lproj/LaunchScreen.xib index cbcb182..04a873a 100644 --- a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/Base.lproj/LaunchScreen.xib +++ b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Base.lproj/LaunchScreen.xib @@ -1,9 +1,8 @@ - - + + - - - + + @@ -14,21 +13,18 @@ - - - + diff --git a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/Base.lproj/Main.storyboard b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Base.lproj/Main.storyboard similarity index 76% rename from DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/Base.lproj/Main.storyboard rename to DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Base.lproj/Main.storyboard index 280b163..e7092ce 100644 --- a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/Base.lproj/Main.storyboard +++ b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Base.lproj/Main.storyboard @@ -1,55 +1,56 @@ - - + + + + + - + + - + - + - - - + diff --git a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/Images.xcassets/AppIcon.appiconset/Contents.json b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 67% rename from DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/Images.xcassets/AppIcon.appiconset/Contents.json rename to DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Images.xcassets/AppIcon.appiconset/Contents.json index 36d2c80..d8db8d6 100644 --- a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Images.xcassets/AppIcon.appiconset/Contents.json @@ -1,5 +1,15 @@ { "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, { "idiom" : "iphone", "size" : "29x29", @@ -30,6 +40,16 @@ "size" : "60x60", "scale" : "3x" }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "scale" : "2x" + }, { "idiom" : "ipad", "size" : "29x29", @@ -59,6 +79,16 @@ "idiom" : "ipad", "size" : "76x76", "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" } ], "info" : { diff --git a/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Images.xcassets/Contents.json b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Images.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/Images.xcassets/heart.imageset/Contents.json b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Images.xcassets/heart.imageset/Contents.json similarity index 100% rename from DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/Images.xcassets/heart.imageset/Contents.json rename to DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Images.xcassets/heart.imageset/Contents.json diff --git a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/Images.xcassets/heart.imageset/heart.png b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Images.xcassets/heart.imageset/heart.png similarity index 100% rename from DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/Images.xcassets/heart.imageset/heart.png rename to DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Images.xcassets/heart.imageset/heart.png diff --git a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/Images.xcassets/like.imageset/Contents.json b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Images.xcassets/like.imageset/Contents.json similarity index 100% rename from DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/Images.xcassets/like.imageset/Contents.json rename to DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Images.xcassets/like.imageset/Contents.json diff --git a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/Images.xcassets/like.imageset/like.png b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Images.xcassets/like.imageset/like.png similarity index 100% rename from DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/Images.xcassets/like.imageset/like.png rename to DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Images.xcassets/like.imageset/like.png diff --git a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/Images.xcassets/smile.imageset/Contents.json b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Images.xcassets/smile.imageset/Contents.json similarity index 100% rename from DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/Images.xcassets/smile.imageset/Contents.json rename to DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Images.xcassets/smile.imageset/Contents.json diff --git a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/Images.xcassets/smile.imageset/smile.png b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Images.xcassets/smile.imageset/smile.png similarity index 100% rename from DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/Images.xcassets/smile.imageset/smile.png rename to DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Images.xcassets/smile.imageset/smile.png diff --git a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/Images.xcassets/star.imageset/Contents.json b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Images.xcassets/star.imageset/Contents.json similarity index 82% rename from DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/Images.xcassets/star.imageset/Contents.json rename to DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Images.xcassets/star.imageset/Contents.json index 8e0b1a3..9881a38 100644 --- a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/Images.xcassets/star.imageset/Contents.json +++ b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Images.xcassets/star.imageset/Contents.json @@ -6,8 +6,8 @@ }, { "idiom" : "universal", - "scale" : "2x", - "filename" : "star.png" + "filename" : "star.png", + "scale" : "2x" }, { "idiom" : "universal", diff --git a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/Images.xcassets/star.imageset/star.png b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Images.xcassets/star.imageset/star.png similarity index 100% rename from DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/Images.xcassets/star.imageset/star.png rename to DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Images.xcassets/star.imageset/star.png diff --git a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/Info.plist b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Info.plist similarity index 100% rename from DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/Info.plist rename to DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/Info.plist diff --git a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/ViewController.swift b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/ViewController.swift similarity index 80% rename from DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/ViewController.swift rename to DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/ViewController.swift index a525b57..dff04d0 100644 --- a/DOFavoriteButton-DEMO/DOFavoriteButton-DEMO/ViewController.swift +++ b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/ViewController.swift @@ -7,11 +7,10 @@ // import UIKit -import DOFavoriteButton class ViewController: UIViewController { - @IBOutlet var heartButton: DOFavoriteButton! + @IBOutlet var heartButton: DOFavoriteButtonNew! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. @@ -21,13 +20,13 @@ class ViewController: UIViewController { let y = self.view.frame.height / 2 - 22 // star button - let starButton = DOFavoriteButton(frame: CGRect(x: x, y: y, width: 44, height: 44), image: UIImage(named: "star")) + let starButton = DOFavoriteButtonNew(frame: CGRect(x: x, y: y, width: 44, height: 44), image: UIImage(named: "star")) starButton.addTarget(self, action: #selector(self.tappedButton), for: .touchUpInside) self.view.addSubview(starButton) x += width // heart button - let heartButton = DOFavoriteButton(frame: CGRect(x: x, y: y, width: 44, height: 44), image: UIImage(named: "heart")) + let heartButton = DOFavoriteButtonNew(frame: CGRect(x: x, y: y, width: 44, height: 44), image: UIImage(named: "heart")) heartButton.imageColorOn = UIColor(red: 254/255, green: 110/255, blue: 111/255, alpha: 1.0) heartButton.circleColor = UIColor(red: 254/255, green: 110/255, blue: 111/255, alpha: 1.0) heartButton.lineColor = UIColor(red: 226/255, green: 96/255, blue: 96/255, alpha: 1.0) @@ -36,7 +35,7 @@ class ViewController: UIViewController { x += width // like button - let likeButton = DOFavoriteButton(frame: CGRect(x: x, y: y, width: 44, height: 44), image: UIImage(named: "like")) + let likeButton = DOFavoriteButtonNew(frame: CGRect(x: x, y: y, width: 44, height: 44), image: UIImage(named: "like")) likeButton.imageColorOn = UIColor(red: 52/255, green: 152/255, blue: 219/255, alpha: 1.0) likeButton.circleColor = UIColor(red: 52/255, green: 152/255, blue: 219/255, alpha: 1.0) likeButton.lineColor = UIColor(red: 41/255, green: 128/255, blue: 185/255, alpha: 1.0) @@ -45,7 +44,7 @@ class ViewController: UIViewController { x += width // smile button - let smileButton = DOFavoriteButton(frame: CGRect(x: x, y: y, width: 44, height: 44), image: UIImage(named: "smile")) + let smileButton = DOFavoriteButtonNew(frame: CGRect(x: x, y: y, width: 44, height: 44), image: UIImage(named: "smile")) smileButton.imageColorOn = UIColor(red: 45/255, green: 204/255, blue: 112/255, alpha: 1.0) smileButton.circleColor = UIColor(red: 45/255, green: 204/255, blue: 112/255, alpha: 1.0) smileButton.lineColor = UIColor(red: 45/255, green: 195/255, blue: 106/255, alpha: 1.0) @@ -61,7 +60,7 @@ class ViewController: UIViewController { // Dispose of any resources that can be recreated. } - @objc func tappedButton(sender: DOFavoriteButton) { + @objc func tappedButton(sender: DOFavoriteButtonNew) { if sender.isSelected { sender.deselect() } else { diff --git a/DOFavoriteButton-DEMO/DOFavoriteButton/DOFavoriteButton.h b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew/DOFavoriteButtonNew.h similarity index 67% rename from DOFavoriteButton-DEMO/DOFavoriteButton/DOFavoriteButton.h rename to DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew/DOFavoriteButtonNew.h index 16abb78..4c2f2e5 100644 --- a/DOFavoriteButton-DEMO/DOFavoriteButton/DOFavoriteButton.h +++ b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew/DOFavoriteButtonNew.h @@ -1,6 +1,6 @@ // -// DOFavoriteButton.h -// DOFavoriteButton +// DOFavoriteButtonNew.h +// DOFavoriteButtonNew // // Created by Daiki Okumura on 2015/07/25. // Copyright (c) 2015 Daiki Okumura. All rights reserved. @@ -9,10 +9,10 @@ #import //! Project version number for DOFavoriteButton. -FOUNDATION_EXPORT double DOFavoriteButtonVersionNumber; +FOUNDATION_EXPORT double DOFavoriteButtonVersionNewNumber; //! Project version string for DOFavoriteButton. -FOUNDATION_EXPORT const unsigned char DOFavoriteButtonVersionString[]; +FOUNDATION_EXPORT const unsigned char DOFavoriteButtonNewVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import diff --git a/DOFavoriteButton-DEMO/DOFavoriteButton/Info.plist b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew/Info.plist similarity index 97% rename from DOFavoriteButton-DEMO/DOFavoriteButton/Info.plist rename to DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew/Info.plist index d3de8ee..2a44702 100644 --- a/DOFavoriteButton-DEMO/DOFavoriteButton/Info.plist +++ b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 1.0 + 0.0.5 CFBundleSignature ???? CFBundleVersion diff --git a/DOFavoriteButton-new.podspec b/DOFavoriteButtonNew.podspec similarity index 92% rename from DOFavoriteButton-new.podspec rename to DOFavoriteButtonNew.podspec index e5f1141..4ff0c26 100644 --- a/DOFavoriteButton-new.podspec +++ b/DOFavoriteButtonNew.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| - s.name = "DOFavoriteButton-new" - s.version = "0.0.5" + s.name = "DOFavoriteButtonNew" + s.version = "0.0.6" s.swift_versions = "5.0" s.summary = "Cute Animated Button written in Swift. It could be just right for favorite buttons!" s.homepage = "https://github.com/ghostlordstar/DOFavoriteButton.git" diff --git a/DOFavoriteButton/DOFavoriteButton.swift b/DOFavoriteButtonNew/DOFavoriteButtonNew.swift similarity index 94% rename from DOFavoriteButton/DOFavoriteButton.swift rename to DOFavoriteButtonNew/DOFavoriteButtonNew.swift index 6a01e6b..6e7d526 100644 --- a/DOFavoriteButton/DOFavoriteButton.swift +++ b/DOFavoriteButtonNew/DOFavoriteButtonNew.swift @@ -1,6 +1,6 @@ // -// DOFavoriteButton.swift -// DOFavoriteButton +// DOFavoriteButtonNew.swift +// DOFavoriteButtonNew // // Created by Daiki Okumura on 2015/07/09. // Copyright (c) 2015 Daiki Okumura. All rights reserved. @@ -12,7 +12,7 @@ import UIKit @IBDesignable -open class DOFavoriteButton: UIButton { +open class DOFavoriteButtonNew: UIButton { fileprivate var imageShape: CAShapeLayer! @IBInspectable open var image: UIImage! { @@ -338,26 +338,26 @@ open class DOFavoriteButton: UIButton { //=============== // add target //=============== - self.addTarget(self, action: #selector(DOFavoriteButton.touchDown(_:)), for: .touchDown) - self.addTarget(self, action: #selector(DOFavoriteButton.touchUpInside(_:)), for: .touchUpInside) - self.addTarget(self, action: #selector(DOFavoriteButton.touchDragExit(_:)), for: .touchDragExit) - self.addTarget(self, action: #selector(DOFavoriteButton.touchDragEnter(_:)), for: .touchDragEnter) - self.addTarget(self, action: #selector(DOFavoriteButton.touchCancel(_:)), for: .touchCancel) + self.addTarget(self, action: #selector(DOFavoriteButtonNew.touchDown(_:)), for: .touchDown) + self.addTarget(self, action: #selector(DOFavoriteButtonNew.touchUpInside(_:)), for: .touchUpInside) + self.addTarget(self, action: #selector(DOFavoriteButtonNew.touchDragExit(_:)), for: .touchDragExit) + self.addTarget(self, action: #selector(DOFavoriteButtonNew.touchDragEnter(_:)), for: .touchDragEnter) + self.addTarget(self, action: #selector(DOFavoriteButtonNew.touchCancel(_:)), for: .touchCancel) } - @objc func touchDown(_ sender: DOFavoriteButton) { + @objc func touchDown(_ sender: DOFavoriteButtonNew) { self.layer.opacity = 0.4 } - @objc func touchUpInside(_ sender: DOFavoriteButton) { + @objc func touchUpInside(_ sender: DOFavoriteButtonNew) { self.layer.opacity = 1.0 } - @objc func touchDragExit(_ sender: DOFavoriteButton) { + @objc func touchDragExit(_ sender: DOFavoriteButtonNew) { self.layer.opacity = 1.0 } - @objc func touchDragEnter(_ sender: DOFavoriteButton) { + @objc func touchDragEnter(_ sender: DOFavoriteButtonNew) { self.layer.opacity = 0.4 } - @objc func touchCancel(_ sender: DOFavoriteButton) { + @objc func touchCancel(_ sender: DOFavoriteButtonNew) { self.layer.opacity = 1.0 } diff --git a/DOFavoriteButton/heart.png b/DOFavoriteButtonNew/heart.png similarity index 100% rename from DOFavoriteButton/heart.png rename to DOFavoriteButtonNew/heart.png diff --git a/DOFavoriteButton/like.png b/DOFavoriteButtonNew/like.png similarity index 100% rename from DOFavoriteButton/like.png rename to DOFavoriteButtonNew/like.png diff --git a/DOFavoriteButton/smile.png b/DOFavoriteButtonNew/smile.png similarity index 100% rename from DOFavoriteButton/smile.png rename to DOFavoriteButtonNew/smile.png diff --git a/DOFavoriteButton/star.png b/DOFavoriteButtonNew/star.png similarity index 100% rename from DOFavoriteButton/star.png rename to DOFavoriteButtonNew/star.png diff --git a/README.md b/README.md index 6f389bc..934c5bb 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# DOFavoriteButton +# DOFavoriteButtonNew [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -[![Version](https://img.shields.io/cocoapods/v/DOFavoriteButton.svg?style=flat)](http://cocoapods.org/pods/DOFavoriteButton-new) -[![Platform](https://img.shields.io/cocoapods/p/DOFavoriteButton.svg?style=flat)](http://cocoapods.org/pods/DOFavoriteButton-new) -[![License](https://img.shields.io/cocoapods/l/DOFavoriteButton.svg?style=flat)](https://github.com/ghostlordstar/DOFavoriteButton/blob/master/LICENSE) +[![Version](https://img.shields.io/cocoapods/v/DOFavoriteButtonNew.svg?style=flat)](http://cocoapods.org/pods/DOFavoriteButtonNew) +[![Platform](https://img.shields.io/cocoapods/p/DOFavoriteButtonNew.svg?style=flat)](http://cocoapods.org/pods/DOFavoriteButtonNew) +[![License](https://img.shields.io/cocoapods/l/DOFavoriteButtonNew.svg?style=flat)](https://github.com/ghostlordstar/DOFavoriteButton/blob/master/LICENSE) Cute Animated Button written in Swift. It could be just right for favorite buttons! @@ -16,20 +16,20 @@ DOFavoriteButton-new is based on the [DOFavoriteButton](https://github.com/okmr- * Swift 5.0 ## Installation - +github "ghostlordstar/DOFavoriteButtonNew" +``` #### CocoaPods Add the following line to your `Podfile`: ``` -pod 'DOFavoriteButton-new' +pod 'DOFavoriteButtonNew' ``` #### Manual -Just drag DOFavoriteButton.swift to your project. +Just drag DOFavoriteButtonNew.swift to your project. ## How to use #### 1. Add a flat icon image @@ -38,12 +38,12 @@ Just drag DOFavoriteButton.swift to your project. #### 2. Create a button ##### ・By coding ```swift -let button = DOFavoriteButton(frame: CGRectMake(0, 0, 44, 44), image: UIImage(named: "star.png")) +let button = DOFavoriteButtonNew(frame: CGRect(x: 100, y:100, width: 44, height: 44), image: UIImage(named: "star.png")) self.view.addSubview(button) ``` ##### ・By using Storyboard or XIB -1. Add Button object and set Custom Class `DOFavoriteButton` +1. Add Button object and set Custom Class `DOFavoriteButtonNew` ![via Storyboard](https://raw.githubusercontent.com/okmr-d/okmr-d.github.io/master/img/DOFavoriteButton/storyboard.png) 2. Connect Outlet @@ -54,8 +54,8 @@ self.view.addSubview(button) button.addTarget(self, action: Selector("tapped:"), forControlEvents: .TouchUpInside) ``` ```swift -func tapped(sender: DOFavoriteButton) { - if sender.selected { +func tapped(sender: DOFavoriteButtonNew) { + if sender.isSelected { // deselect sender.deselect() } else { @@ -81,7 +81,7 @@ Result: There is a demo project added to this repository, so you can see how it works. ## Credit/Inspiration -DOFavoriteButton was inspired by [Twitter's iOS App](https://itunes.apple.com/us/app/twitter/id333903271). +DOFavoriteButtonNew was inspired by [Twitter's iOS App](https://itunes.apple.com/us/app/twitter/id333903271). ## License This software is released under the MIT License. From a4d418518c89a10d566789f30f62c32e428096ab Mon Sep 17 00:00:00 2001 From: ghostlord Date: Tue, 20 Aug 2019 20:49:13 +0800 Subject: [PATCH 5/7] =?UTF-8?q?[GL][=E4=BF=AE=E6=94=B9podspec=E6=96=87?= =?UTF-8?q?=E4=BB=B6]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DOFavoriteButtonNew.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DOFavoriteButtonNew.podspec b/DOFavoriteButtonNew.podspec index 4ff0c26..4012fa2 100644 --- a/DOFavoriteButtonNew.podspec +++ b/DOFavoriteButtonNew.podspec @@ -10,8 +10,8 @@ Pod::Spec.new do |s| s.social_media_url = "http://ghostlordstar.github.io" s.platform = :ios, "8.0" s.source = { :git => "https://github.com/ghostlordstar/DOFavoriteButton.git", :tag => s.version.to_s } - s.source_files = "DOFavoriteButton/*.swift" - s.resources = "DOFavoriteButton/*.png" + s.source_files = "DOFavoriteButtonNew/*.swift" + s.resources = "DOFavoriteButtonNew/*.png" s.framework = "UIKit" s.requires_arc = true end From 044a6d8c0f48273ee01bf28d5dddace8ac531409 Mon Sep 17 00:00:00 2001 From: ghostlord Date: Tue, 20 Aug 2019 20:56:28 +0800 Subject: [PATCH 6/7] [GL][update README] --- README.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 934c5bb..d2d2325 100644 --- a/README.md +++ b/README.md @@ -51,18 +51,18 @@ self.view.addSubview(button) #### 3. Add tapped function ```swift -button.addTarget(self, action: Selector("tapped:"), forControlEvents: .TouchUpInside) +button.addTarget(self, action: #selector(tapped(sender:)), for: UIControl.Event.touchUpInside) ``` ```swift -func tapped(sender: DOFavoriteButtonNew) { - if sender.isSelected { - // deselect - sender.deselect() - } else { - // select with animation - sender.select() +@objc func tapped(sender: DOFavoriteButtonNew) { + if sender.isSelected { + // deselect + sender.deselect() + } else { + // select with animation + sender.select() + } } -} ``` ## Customize From 27cf2d929b0890e1ee24c9dfccabe47c5c169949 Mon Sep 17 00:00:00 2001 From: Hansen Date: Wed, 22 Dec 2021 12:38:37 +0800 Subject: [PATCH 7/7] [GL][fix demo build error] --- .../DOFavoriteButtonNew-DEMO/ViewController.swift | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/ViewController.swift b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/ViewController.swift index dff04d0..243f782 100644 --- a/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/ViewController.swift +++ b/DOFavoriteButtonNew-DEMO/DOFavoriteButtonNew-DEMO/ViewController.swift @@ -7,7 +7,7 @@ // import UIKit - +import DOFavoriteButtonNew class ViewController: UIViewController { @IBOutlet var heartButton: DOFavoriteButtonNew! @@ -17,7 +17,7 @@ class ViewController: UIViewController { let width = (self.view.frame.width - 44) / 4 var x = width / 2 - let y = self.view.frame.height / 2 - 22 + let y = 100.0 // star button let starButton = DOFavoriteButtonNew(frame: CGRect(x: x, y: y, width: 44, height: 44), image: UIImage(named: "star")) @@ -53,6 +53,11 @@ class ViewController: UIViewController { self.heartButton.addTarget(self, action: #selector(self.tappedButton), for: .touchUpInside) + + // star button + let bigStarButton = DOFavoriteButtonNew(frame: CGRect(x: (self.view.frame.width - 100.0) / 2.0, y: (self.view.frame.height - 100.0)/2.0 , width: 100, height: 100), image: UIImage(named: "star")) + bigStarButton.addTarget(self, action: #selector(self.tappedButton), for: .touchUpInside) + self.view.addSubview(bigStarButton) } override func didReceiveMemoryWarning() {