From 34c88cd34588760cc121bb8ab3e177e26fc9002e Mon Sep 17 00:00:00 2001 From: Glen Yi Date: Wed, 9 Sep 2015 18:44:18 -0400 Subject: [PATCH] - Support for Xcode 7, Swift 2.0 - Increased control version - Updated gitignore --- .gitignore | 44 ++++++- FloatRatingView.podspec | 2 +- FloatRatingView.swift | 16 +-- .../Rating Demo.xcodeproj/project.pbxproj | 19 +-- .../xcshareddata/Rating Demo.xccheckout | 41 ------- .../xcdebugger/Breakpoints_v2.xcbkptlist | 5 - .../xcschemes/Rating Demo.xcscheme | 110 ------------------ .../xcschemes/xcschememanagement.plist | 27 ----- .../Rating Demo/Base.lproj/Main.storyboard | 29 ++--- Rating Demo/Rating Demo/Info.plist | 6 +- Rating Demo/Rating DemoTests/Info.plist | 2 +- 11 files changed, 81 insertions(+), 220 deletions(-) delete mode 100644 Rating Demo/Rating Demo.xcodeproj/project.xcworkspace/xcshareddata/Rating Demo.xccheckout delete mode 100644 Rating Demo/Rating Demo.xcodeproj/xcuserdata/gren.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist delete mode 100644 Rating Demo/Rating Demo.xcodeproj/xcuserdata/gren.xcuserdatad/xcschemes/Rating Demo.xcscheme delete mode 100644 Rating Demo/Rating Demo.xcodeproj/xcuserdata/gren.xcuserdatad/xcschemes/xcschememanagement.plist diff --git a/.gitignore b/.gitignore index b3aa26d..04529e0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,43 @@ -*.xcuserstate \ No newline at end of file +# Xcode +# +# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore + +## Build generated +build/ +DerivedData + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata + +## Other +*.xccheckout +*.moved-aside +*.xcuserstate +*.xcscmblueprint + +## Obj-C/Swift specific +*.hmap +*.ipa + +# 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-check-the-pods-directory-into-source-control +# +#Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build \ No newline at end of file diff --git a/FloatRatingView.podspec b/FloatRatingView.podspec index 9758150..3dbb930 100644 --- a/FloatRatingView.podspec +++ b/FloatRatingView.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |spec| spec.name = 'FloatRatingView' - spec.version = '1.0.0' + spec.version = '1.0.1' spec.summary = 'Whole, half or floating point ratings control written in Swift.' spec.homepage = 'https://github.com/strekfus/FloatRatingView' spec.license = 'MIT' diff --git a/FloatRatingView.swift b/FloatRatingView.swift index 2460887..45da4ba 100644 --- a/FloatRatingView.swift +++ b/FloatRatingView.swift @@ -143,7 +143,7 @@ public class FloatRatingView: UIView { self.initImageViews() } - required public init(coder aDecoder: NSCoder) { + required public init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) self.initImageViews() @@ -239,7 +239,7 @@ public class FloatRatingView: UIView { } // Add new image views - for i in 0.. imageView.frame.origin.x { // Find touch point in image view @@ -294,21 +294,21 @@ public class FloatRatingView: UIView { } } - override public func touchesBegan(touches: Set, withEvent event: UIEvent) { - if let touch = touches.first as? UITouch { + override public func touchesBegan(touches: Set, withEvent event: UIEvent?) { + if let touch = touches.first { let touchLocation = touch.locationInView(self) self.handleTouchAtLocation(touchLocation) } } - override public func touchesMoved(touches: Set, withEvent event: UIEvent) { - if let touch = touches.first as? UITouch { + override public func touchesMoved(touches: Set, withEvent event: UIEvent?) { + if let touch = touches.first { let touchLocation = touch.locationInView(self) self.handleTouchAtLocation(touchLocation) } } - override public func touchesEnded(touches: Set, withEvent event: UIEvent) { + override public func touchesEnded(touches: Set, withEvent event: UIEvent?) { // Update delegate if let delegate = self.delegate { delegate.floatRatingView(self, didUpdate: self.rating) diff --git a/Rating Demo/Rating Demo.xcodeproj/project.pbxproj b/Rating Demo/Rating Demo.xcodeproj/project.pbxproj index ca62459..6684145 100644 --- a/Rating Demo/Rating Demo.xcodeproj/project.pbxproj +++ b/Rating Demo/Rating Demo.xcodeproj/project.pbxproj @@ -164,7 +164,9 @@ B275F3F919BA5E3600E6F169 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0600; + LastSwiftMigration = 0700; + LastSwiftUpdateCheck = 0700; + LastUpgradeCheck = 0700; ORGANIZATIONNAME = "On The Pursuit"; TargetAttributes = { B275F40019BA5E3600E6F169 = { @@ -275,6 +277,7 @@ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; @@ -340,6 +343,7 @@ INFOPLIST_FILE = "Rating Demo/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 7.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.onthepursuit.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Debug; @@ -352,6 +356,7 @@ INFOPLIST_FILE = "Rating Demo/Info.plist"; IPHONEOS_DEPLOYMENT_TARGET = 7.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.onthepursuit.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; }; name = Release; @@ -360,16 +365,14 @@ isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); + FRAMEWORK_SEARCH_PATHS = "$(inherited)"; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "$(inherited)", ); INFOPLIST_FILE = "Rating DemoTests/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.onthepursuit.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Rating Demo.app/Rating Demo"; }; @@ -379,12 +382,10 @@ isa = XCBuildConfiguration; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); + FRAMEWORK_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = "Rating DemoTests/Info.plist"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.onthepursuit.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Rating Demo.app/Rating Demo"; }; diff --git a/Rating Demo/Rating Demo.xcodeproj/project.xcworkspace/xcshareddata/Rating Demo.xccheckout b/Rating Demo/Rating Demo.xcodeproj/project.xcworkspace/xcshareddata/Rating Demo.xccheckout deleted file mode 100644 index 37f3110..0000000 --- a/Rating Demo/Rating Demo.xcodeproj/project.xcworkspace/xcshareddata/Rating Demo.xccheckout +++ /dev/null @@ -1,41 +0,0 @@ - - - - - IDESourceControlProjectFavoriteDictionaryKey - - IDESourceControlProjectIdentifier - F16B709A-E494-40F5-821A-9DFC11424463 - IDESourceControlProjectName - Rating Demo - IDESourceControlProjectOriginsDictionary - - 8211DB8A25B93C5A27A19A5521E6302076AD013D - github.com:strekfus/FloatRatingView.git - - IDESourceControlProjectPath - Rating Demo/Rating Demo.xcodeproj - IDESourceControlProjectRelativeInstallPathDictionary - - 8211DB8A25B93C5A27A19A5521E6302076AD013D - ../../.. - - IDESourceControlProjectURL - github.com:strekfus/FloatRatingView.git - IDESourceControlProjectVersion - 111 - IDESourceControlProjectWCCIdentifier - 8211DB8A25B93C5A27A19A5521E6302076AD013D - IDESourceControlProjectWCConfigurations - - - IDESourceControlRepositoryExtensionIdentifierKey - public.vcs.git - IDESourceControlWCCIdentifierKey - 8211DB8A25B93C5A27A19A5521E6302076AD013D - IDESourceControlWCCName - FloatRatingView - - - - diff --git a/Rating Demo/Rating Demo.xcodeproj/xcuserdata/gren.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/Rating Demo/Rating Demo.xcodeproj/xcuserdata/gren.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist deleted file mode 100644 index fe2b454..0000000 --- a/Rating Demo/Rating Demo.xcodeproj/xcuserdata/gren.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/Rating Demo/Rating Demo.xcodeproj/xcuserdata/gren.xcuserdatad/xcschemes/Rating Demo.xcscheme b/Rating Demo/Rating Demo.xcodeproj/xcuserdata/gren.xcuserdatad/xcschemes/Rating Demo.xcscheme deleted file mode 100644 index def161e..0000000 --- a/Rating Demo/Rating Demo.xcodeproj/xcuserdata/gren.xcuserdatad/xcschemes/Rating Demo.xcscheme +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Rating Demo/Rating Demo.xcodeproj/xcuserdata/gren.xcuserdatad/xcschemes/xcschememanagement.plist b/Rating Demo/Rating Demo.xcodeproj/xcuserdata/gren.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index 8ec0f6d..0000000 --- a/Rating Demo/Rating Demo.xcodeproj/xcuserdata/gren.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,27 +0,0 @@ - - - - - SchemeUserState - - Rating Demo.xcscheme - - orderHint - 0 - - - SuppressBuildableAutocreation - - B275F40019BA5E3600E6F169 - - primary - - - B275F41219BA5E3600E6F169 - - primary - - - - - diff --git a/Rating Demo/Rating Demo/Base.lproj/Main.storyboard b/Rating Demo/Rating Demo/Base.lproj/Main.storyboard index 5e95af2..585193d 100644 --- a/Rating Demo/Rating Demo/Base.lproj/Main.storyboard +++ b/Rating Demo/Rating Demo/Base.lproj/Main.storyboard @@ -1,7 +1,8 @@ - + - + + @@ -19,13 +20,13 @@ - + @@ -45,31 +46,31 @@ - + diff --git a/Rating Demo/Rating Demo/Info.plist b/Rating Demo/Rating Demo/Info.plist index 306c40d..a97e6b8 100644 --- a/Rating Demo/Rating Demo/Info.plist +++ b/Rating Demo/Rating Demo/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - com.onthepursuit.$(PRODUCT_NAME:rfc1034identifier) + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName @@ -15,11 +15,11 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.0 + 1.0.1 CFBundleSignature ???? CFBundleVersion - 1 + 2 LSRequiresIPhoneOS UILaunchStoryboardName diff --git a/Rating Demo/Rating DemoTests/Info.plist b/Rating Demo/Rating DemoTests/Info.plist index 36b7ce6..ba72822 100644 --- a/Rating Demo/Rating DemoTests/Info.plist +++ b/Rating Demo/Rating DemoTests/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - com.onthepursuit.$(PRODUCT_NAME:rfc1034identifier) + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName