diff --git a/Demo/LGPlusButtonsViewDemo.xcodeproj/project.pbxproj b/Demo/LGPlusButtonsViewDemo.xcodeproj/project.pbxproj index 7a3f639..04f565f 100644 --- a/Demo/LGPlusButtonsViewDemo.xcodeproj/project.pbxproj +++ b/Demo/LGPlusButtonsViewDemo.xcodeproj/project.pbxproj @@ -7,9 +7,10 @@ objects = { /* Begin PBXBuildFile section */ - 1946D2D8D0CE8124E0632DEA /* libPods-LGPlusButtonsViewDemo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 23A4E5C49FE8BEAB57D05B49 /* libPods-LGPlusButtonsViewDemo.a */; }; 4A1F8E611BEE098100D0B57E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 4A1F8E601BEE098100D0B57E /* LaunchScreen.storyboard */; }; 4A3F4B5A1AA8BA51006D9DAA /* PlusViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4A3F4B591AA8BA51006D9DAA /* PlusViewController.m */; }; + 4AF13A1F1BF3AD270037B073 /* LGPlusButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 4AF13A1C1BF3AD270037B073 /* LGPlusButton.m */; }; + 4AF13A201BF3AD270037B073 /* LGPlusButtonsView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4AF13A1E1BF3AD270037B073 /* LGPlusButtonsView.m */; }; 847A899A1A9F298B004A8413 /* NavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 847A89971A9F298B004A8413 /* NavigationController.m */; }; 847A899B1A9F298B004A8413 /* TableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 847A89991A9F298B004A8413 /* TableViewController.m */; }; 847A899E1A9F2C32004A8413 /* PlusScrollViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 847A899D1A9F2C32004A8413 /* PlusScrollViewController.m */; }; @@ -19,11 +20,13 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 23A4E5C49FE8BEAB57D05B49 /* libPods-LGPlusButtonsViewDemo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-LGPlusButtonsViewDemo.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 4A1F8E601BEE098100D0B57E /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = LaunchScreen.storyboard; sourceTree = ""; }; 4A3F4B581AA8BA51006D9DAA /* PlusViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlusViewController.h; sourceTree = ""; }; 4A3F4B591AA8BA51006D9DAA /* PlusViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PlusViewController.m; sourceTree = ""; }; - 6CA3D88515E7F3B71D89BE22 /* Pods-LGPlusButtonsViewDemo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LGPlusButtonsViewDemo.release.xcconfig"; path = "Pods/Target Support Files/Pods-LGPlusButtonsViewDemo/Pods-LGPlusButtonsViewDemo.release.xcconfig"; sourceTree = ""; }; + 4AF13A1B1BF3AD270037B073 /* LGPlusButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LGPlusButton.h; sourceTree = ""; }; + 4AF13A1C1BF3AD270037B073 /* LGPlusButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LGPlusButton.m; sourceTree = ""; }; + 4AF13A1D1BF3AD270037B073 /* LGPlusButtonsView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LGPlusButtonsView.h; sourceTree = ""; }; + 4AF13A1E1BF3AD270037B073 /* LGPlusButtonsView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LGPlusButtonsView.m; sourceTree = ""; }; 847A89961A9F298B004A8413 /* NavigationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NavigationController.h; sourceTree = ""; }; 847A89971A9F298B004A8413 /* NavigationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NavigationController.m; sourceTree = ""; }; 847A89981A9F298B004A8413 /* TableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TableViewController.h; sourceTree = ""; }; @@ -36,7 +39,6 @@ 84C5B7CE1A9F22C800EEEB24 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 84C5B7CF1A9F22C800EEEB24 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 84C5B7D71A9F22C800EEEB24 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; - FF64EDB1BA04182CD80346D1 /* Pods-LGPlusButtonsViewDemo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-LGPlusButtonsViewDemo.debug.xcconfig"; path = "Pods/Target Support Files/Pods-LGPlusButtonsViewDemo/Pods-LGPlusButtonsViewDemo.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -44,22 +46,12 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 1946D2D8D0CE8124E0632DEA /* libPods-LGPlusButtonsViewDemo.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 4A3F4B5C1AA8BDAD006D9DAA /* Demo View Controllers */ = { - isa = PBXGroup; - children = ( - 4A3F4B5D1AA8BDBA006D9DAA /* UIView */, - 4A3F4B5E1AA8BDBE006D9DAA /* UIScrollView */, - ); - name = "Demo View Controllers"; - sourceTree = ""; - }; 4A3F4B5D1AA8BDBA006D9DAA /* UIView */ = { isa = PBXGroup; children = ( @@ -78,29 +70,31 @@ name = UIScrollView; sourceTree = ""; }; - 6DC0BC0EF35C3CCDCDDDD0F1 /* Frameworks */ = { + 4AF13A1A1BF3AD270037B073 /* LGPlusButtonsView */ = { isa = PBXGroup; children = ( - 23A4E5C49FE8BEAB57D05B49 /* libPods-LGPlusButtonsViewDemo.a */, + 4AF13A1B1BF3AD270037B073 /* LGPlusButton.h */, + 4AF13A1C1BF3AD270037B073 /* LGPlusButton.m */, + 4AF13A1D1BF3AD270037B073 /* LGPlusButtonsView.h */, + 4AF13A1E1BF3AD270037B073 /* LGPlusButtonsView.m */, ); - name = Frameworks; + name = LGPlusButtonsView; + path = ../LGPlusButtonsView; sourceTree = ""; }; - 83663343D58C23F2EE00B73C /* Pods */ = { + 6DC0BC0EF35C3CCDCDDDD0F1 /* Frameworks */ = { isa = PBXGroup; children = ( - FF64EDB1BA04182CD80346D1 /* Pods-LGPlusButtonsViewDemo.debug.xcconfig */, - 6CA3D88515E7F3B71D89BE22 /* Pods-LGPlusButtonsViewDemo.release.xcconfig */, ); - name = Pods; + name = Frameworks; sourceTree = ""; }; 84C5B7BE1A9F22C800EEEB24 = { isa = PBXGroup; children = ( + 4AF13A1A1BF3AD270037B073 /* LGPlusButtonsView */, 84C5B7C91A9F22C800EEEB24 /* LGPlusButtonsViewDemo */, 84C5B7C81A9F22C800EEEB24 /* Products */, - 83663343D58C23F2EE00B73C /* Pods */, 6DC0BC0EF35C3CCDCDDDD0F1 /* Frameworks */, ); sourceTree = ""; @@ -122,7 +116,8 @@ 847A89971A9F298B004A8413 /* NavigationController.m */, 847A89981A9F298B004A8413 /* TableViewController.h */, 847A89991A9F298B004A8413 /* TableViewController.m */, - 4A3F4B5C1AA8BDAD006D9DAA /* Demo View Controllers */, + 4A3F4B5D1AA8BDBA006D9DAA /* UIView */, + 4A3F4B5E1AA8BDBE006D9DAA /* UIScrollView */, 84C5B7D71A9F22C800EEEB24 /* Images.xcassets */, 84C5B7CA1A9F22C800EEEB24 /* Supporting Files */, 4A1F8E601BEE098100D0B57E /* LaunchScreen.storyboard */, @@ -146,12 +141,9 @@ isa = PBXNativeTarget; buildConfigurationList = 84C5B7EA1A9F22C800EEEB24 /* Build configuration list for PBXNativeTarget "LGPlusButtonsViewDemo" */; buildPhases = ( - B1C231C3EE6FF3450126BB97 /* Check Pods Manifest.lock */, 84C5B7C31A9F22C800EEEB24 /* Sources */, 84C5B7C41A9F22C800EEEB24 /* Frameworks */, 84C5B7C51A9F22C800EEEB24 /* Resources */, - 92F9790D16709FEEE544F8D3 /* Copy Pods Resources */, - F9E826B8E08EA21BF3C0A16C /* Embed Pods Frameworks */, ); buildRules = ( ); @@ -206,65 +198,19 @@ }; /* End PBXResourcesBuildPhase section */ -/* Begin PBXShellScriptBuildPhase section */ - 92F9790D16709FEEE544F8D3 /* Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-LGPlusButtonsViewDemo/Pods-LGPlusButtonsViewDemo-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - B1C231C3EE6FF3450126BB97 /* Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Check Pods Manifest.lock"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - F9E826B8E08EA21BF3C0A16C /* Embed Pods Frameworks */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Embed Pods Frameworks"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-LGPlusButtonsViewDemo/Pods-LGPlusButtonsViewDemo-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - /* Begin PBXSourcesBuildPhase section */ 84C5B7C31A9F22C800EEEB24 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + 4AF13A1F1BF3AD270037B073 /* LGPlusButton.m in Sources */, 4A3F4B5A1AA8BA51006D9DAA /* PlusViewController.m in Sources */, 847A899E1A9F2C32004A8413 /* PlusScrollViewController.m in Sources */, 847A899A1A9F298B004A8413 /* NavigationController.m in Sources */, 84C5B7D01A9F22C800EEEB24 /* AppDelegate.m in Sources */, 847A899B1A9F298B004A8413 /* TableViewController.m in Sources */, 84C5B7CD1A9F22C800EEEB24 /* main.m in Sources */, + 4AF13A201BF3AD270037B073 /* LGPlusButtonsView.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -352,33 +298,35 @@ }; 84C5B7EB1A9F22C800EEEB24 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FF64EDB1BA04182CD80346D1 /* Pods-LGPlusButtonsViewDemo.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; HEADER_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = LGPlusButtonsViewDemo/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 6.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.test.$(PRODUCT_NAME)"; + PRODUCT_BUNDLE_IDENTIFIER = com.test.LGPlusButtonsViewDemo; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; }; name = Debug; }; 84C5B7EC1A9F22C800EEEB24 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 6CA3D88515E7F3B71D89BE22 /* Pods-LGPlusButtonsViewDemo.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; HEADER_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = LGPlusButtonsViewDemo/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 6.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "com.test.$(PRODUCT_NAME)"; + PRODUCT_BUNDLE_IDENTIFIER = com.test.LGPlusButtonsViewDemo; PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE = ""; }; name = Release; }; diff --git a/Demo/LGPlusButtonsViewDemo.xcworkspace/contents.xcworkspacedata b/Demo/LGPlusButtonsViewDemo.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index fa3bd42..0000000 --- a/Demo/LGPlusButtonsViewDemo.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - diff --git a/Demo/LGPlusButtonsViewDemo.xcworkspace/xcshareddata/LGPlusButtonsViewDemo.xcscmblueprint b/Demo/LGPlusButtonsViewDemo.xcworkspace/xcshareddata/LGPlusButtonsViewDemo.xcscmblueprint deleted file mode 100644 index f76229f..0000000 --- a/Demo/LGPlusButtonsViewDemo.xcworkspace/xcshareddata/LGPlusButtonsViewDemo.xcscmblueprint +++ /dev/null @@ -1,30 +0,0 @@ -{ - "DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "112560B489B85D419BBDB1910B347435FE176202", - "DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : { - - }, - "DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : { - "8C7BAE8A443A6327026687B5FEAD2A6BED527DDD" : 0, - "112560B489B85D419BBDB1910B347435FE176202" : 0 - }, - "DVTSourceControlWorkspaceBlueprintIdentifierKey" : "FD3D3D87-9EF8-43C4-A508-88C3E1ECD2E3", - "DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : { - "8C7BAE8A443A6327026687B5FEAD2A6BED527DDD" : "LGDrawer", - "112560B489B85D419BBDB1910B347435FE176202" : "LGPlusButtonsView" - }, - "DVTSourceControlWorkspaceBlueprintNameKey" : "LGPlusButtonsViewDemo", - "DVTSourceControlWorkspaceBlueprintVersion" : 204, - "DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "Demo\/LGPlusButtonsViewDemo.xcworkspace", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [ - { - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/Friend-LGA\/LGPlusButtonsView.git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "112560B489B85D419BBDB1910B347435FE176202" - }, - { - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "https:\/\/github.com\/Friend-LGA\/LGDrawer.git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git", - "DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "8C7BAE8A443A6327026687B5FEAD2A6BED527DDD" - } - ] -} \ No newline at end of file diff --git a/Demo/LGPlusButtonsViewDemo/Images.xcassets/Circle_Highlighted.imageset/Circle_Highlighted-1.png b/Demo/LGPlusButtonsViewDemo/Images.xcassets/Circle_Highlighted.imageset/Circle_Highlighted-1.png new file mode 100644 index 0000000..b8e524f Binary files /dev/null and b/Demo/LGPlusButtonsViewDemo/Images.xcassets/Circle_Highlighted.imageset/Circle_Highlighted-1.png differ diff --git a/Demo/LGPlusButtonsViewDemo/Images.xcassets/Circle_Highlighted.imageset/Circle_Highlighted-2.png b/Demo/LGPlusButtonsViewDemo/Images.xcassets/Circle_Highlighted.imageset/Circle_Highlighted-2.png new file mode 100644 index 0000000..b8e524f Binary files /dev/null and b/Demo/LGPlusButtonsViewDemo/Images.xcassets/Circle_Highlighted.imageset/Circle_Highlighted-2.png differ diff --git a/Demo/LGPlusButtonsViewDemo/Images.xcassets/Circle_Highlighted.imageset/Circle_Highlighted.png b/Demo/LGPlusButtonsViewDemo/Images.xcassets/Circle_Highlighted.imageset/Circle_Highlighted.png new file mode 100644 index 0000000..b8e524f Binary files /dev/null and b/Demo/LGPlusButtonsViewDemo/Images.xcassets/Circle_Highlighted.imageset/Circle_Highlighted.png differ diff --git a/Demo/LGPlusButtonsViewDemo/Images.xcassets/Circle_Highlighted.imageset/Contents.json b/Demo/LGPlusButtonsViewDemo/Images.xcassets/Circle_Highlighted.imageset/Contents.json new file mode 100644 index 0000000..7027693 --- /dev/null +++ b/Demo/LGPlusButtonsViewDemo/Images.xcassets/Circle_Highlighted.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Circle_Highlighted.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "Circle_Highlighted-1.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "Circle_Highlighted-2.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Demo/LGPlusButtonsViewDemo/Images.xcassets/Circle_Normal.imageset/Circle_Normal-1.png b/Demo/LGPlusButtonsViewDemo/Images.xcassets/Circle_Normal.imageset/Circle_Normal-1.png new file mode 100644 index 0000000..7165423 Binary files /dev/null and b/Demo/LGPlusButtonsViewDemo/Images.xcassets/Circle_Normal.imageset/Circle_Normal-1.png differ diff --git a/Demo/LGPlusButtonsViewDemo/Images.xcassets/Circle_Normal.imageset/Circle_Normal-2.png b/Demo/LGPlusButtonsViewDemo/Images.xcassets/Circle_Normal.imageset/Circle_Normal-2.png new file mode 100644 index 0000000..7165423 Binary files /dev/null and b/Demo/LGPlusButtonsViewDemo/Images.xcassets/Circle_Normal.imageset/Circle_Normal-2.png differ diff --git a/Demo/LGPlusButtonsViewDemo/Images.xcassets/Circle_Normal.imageset/Circle_Normal.png b/Demo/LGPlusButtonsViewDemo/Images.xcassets/Circle_Normal.imageset/Circle_Normal.png new file mode 100644 index 0000000..7165423 Binary files /dev/null and b/Demo/LGPlusButtonsViewDemo/Images.xcassets/Circle_Normal.imageset/Circle_Normal.png differ diff --git a/Demo/LGPlusButtonsViewDemo/Images.xcassets/Circle_Normal.imageset/Contents.json b/Demo/LGPlusButtonsViewDemo/Images.xcassets/Circle_Normal.imageset/Contents.json new file mode 100644 index 0000000..50836a3 --- /dev/null +++ b/Demo/LGPlusButtonsViewDemo/Images.xcassets/Circle_Normal.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "Circle_Normal.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "Circle_Normal-1.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "Circle_Normal-2.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Demo/LGPlusButtonsViewDemo/Images.xcassets/Contents.json b/Demo/LGPlusButtonsViewDemo/Images.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/Demo/LGPlusButtonsViewDemo/Images.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/Demo/LGPlusButtonsViewDemo/PlusScrollViewController.m b/Demo/LGPlusButtonsViewDemo/PlusScrollViewController.m index 75d4d47..a69bdfc 100644 --- a/Demo/LGPlusButtonsViewDemo/PlusScrollViewController.m +++ b/Demo/LGPlusButtonsViewDemo/PlusScrollViewController.m @@ -8,7 +8,6 @@ #import "PlusScrollViewController.h" #import "LGPlusButtonsView.h" -#import "LGDrawer.h" @interface PlusScrollViewController () @@ -56,6 +55,9 @@ - (id)initWithTitle:(NSString *)title _plusButtonsView.plusButtonAnimationType = LGPlusButtonAnimationTypeRotate; [_plusButtonsView setButtonsTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; [_plusButtonsView setButtonsAdjustsImageWhenHighlighted:NO]; + [_plusButtonsView setButtonsImage:[UIImage imageNamed:@"Circle_Normal"] forState:UIControlStateNormal]; + [_plusButtonsView setButtonsImage:[UIImage imageNamed:@"Circle_Highlighted"] forState:UIControlStateHighlighted]; + [_plusButtonsView setButtonsLayerShadowColor:[UIColor blackColor] shadowOpacity:0.5 shadowOffset:CGSizeZero shadowRadius:2.f]; //_plusButtonsView.alwaysVisible = YES; //_plusButtonsView.hideButtonsOnScroll = YES; //_plusButtonsView.scrollSensitivity = 0.f; @@ -90,48 +92,19 @@ - (void)viewWillLayoutSubviews BOOL isPortrait = UIInterfaceOrientationIsPortrait([UIApplication sharedApplication].statusBarOrientation); - CGFloat shadowBlur = 3.f; CGFloat buttonSide = (isPortrait ? 64.f : 44.f); + CGFloat inset = (isPortrait ? 3.f : 2.f); CGFloat buttonsFontSize = (isPortrait ? 30.f : 20.f); CGFloat plusButtonFontSize = buttonsFontSize*1.5; - _plusButtonsView.contentInset = UIEdgeInsetsMake(shadowBlur, shadowBlur, shadowBlur, shadowBlur); + _plusButtonsView.buttonInset = UIEdgeInsetsMake(inset, inset, inset, inset); + _plusButtonsView.contentInset = UIEdgeInsetsMake(inset, inset, inset, inset); [_plusButtonsView setButtonsTitleFont:[UIFont boldSystemFontOfSize:buttonsFontSize]]; _plusButtonsView.plusButton.titleLabel.font = [UIFont systemFontOfSize:plusButtonFontSize]; _plusButtonsView.plusButton.titleOffset = CGPointMake(0.f, -plusButtonFontSize*0.1); - UIImage *circleImageNormal = [LGDrawer drawEllipseWithImageSize:CGSizeMake(buttonSide, buttonSide) - size:CGSizeMake(buttonSide-shadowBlur*2, buttonSide-shadowBlur*2) - offset:CGPointZero - rotate:0.f - backgroundColor:nil - fillColor:[UIColor colorWithRed:0.f green:0.5 blue:1.f alpha:1.f] - strokeColor:nil - strokeThickness:0.f - strokeDash:nil - strokeType:LGDrawerStrokeTypeInside - shadowColor:[UIColor colorWithWhite:0.f alpha:0.5] - shadowOffset:CGPointZero - shadowBlur:shadowBlur]; - - UIImage *circleImageHighlighted = [LGDrawer drawEllipseWithImageSize:CGSizeMake(buttonSide, buttonSide) - size:CGSizeMake(buttonSide-shadowBlur*2, buttonSide-shadowBlur*2) - offset:CGPointZero - rotate:0.f - backgroundColor:nil - fillColor:[UIColor colorWithRed:0.2 green:0.7 blue:1.f alpha:1.f] - strokeColor:nil - strokeThickness:0.f - strokeDash:nil - strokeType:LGDrawerStrokeTypeInside - shadowColor:[UIColor colorWithWhite:0.f alpha:0.5] - shadowOffset:CGPointZero - shadowBlur:shadowBlur]; - - [_plusButtonsView setButtonsImage:circleImageNormal forState:UIControlStateNormal]; - [_plusButtonsView setButtonsImage:circleImageHighlighted forState:UIControlStateHighlighted]; - [_plusButtonsView setButtonsImage:circleImageHighlighted forState:UIControlStateHighlighted|UIControlStateSelected]; + _plusButtonsView.buttonsSize = CGSizeMake(buttonSide, buttonSide); } @end diff --git a/Demo/LGPlusButtonsViewDemo/PlusViewController.m b/Demo/LGPlusButtonsViewDemo/PlusViewController.m index 9af81f3..0fd1c75 100644 --- a/Demo/LGPlusButtonsViewDemo/PlusViewController.m +++ b/Demo/LGPlusButtonsViewDemo/PlusViewController.m @@ -54,6 +54,9 @@ - (id)initWithTitle:(NSString *)title _plusButtonsView.appearingAnimationType = LGPlusButtonsAppearingAnimationTypeCrossDissolveAndPop; [_plusButtonsView setButtonsTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; [_plusButtonsView setButtonsAdjustsImageWhenHighlighted:NO]; + [_plusButtonsView setButtonsImage:[UIImage imageNamed:@"Circle_Normal"] forState:UIControlStateNormal]; + [_plusButtonsView setButtonsImage:[UIImage imageNamed:@"Circle_Highlighted"] forState:UIControlStateHighlighted]; + [_plusButtonsView setButtonsLayerShadowColor:[UIColor blackColor] shadowOpacity:0.5 shadowOffset:CGSizeZero shadowRadius:2.f]; } return self; } @@ -108,12 +111,6 @@ - (void)viewWillLayoutSubviews _plusButtonsView.plusButton.titleOffset = CGPointMake(0.f, -plusButtonFontSize*0.1); _plusButtonsView.buttonsSize = CGSizeMake(buttonSide, buttonSide); - [_plusButtonsView setButtonsLayerCornerRadius:buttonSide/2]; - [_plusButtonsView setButtonsLayerBorderColor:[UIColor colorWithRed:0.f green:0.f blue:0.f alpha:0.1] borderWidth:1.f]; - [_plusButtonsView setButtonsLayerMasksToBounds:YES]; - [_plusButtonsView setButtonsBackgroundColor:[UIColor colorWithRed:0.f green:0.5 blue:1.f alpha:1.f] forState:UIControlStateNormal]; - [_plusButtonsView setButtonsBackgroundColor:[UIColor colorWithRed:0.2 green:0.7 blue:1.f alpha:1.f] forState:UIControlStateHighlighted]; - [_plusButtonsView setButtonsBackgroundColor:[UIColor colorWithRed:0.2 green:0.7 blue:1.f alpha:1.f] forState:UIControlStateHighlighted|UIControlStateSelected]; } @end diff --git a/Demo/LGPlusButtonsViewDemo/TableViewController.m b/Demo/LGPlusButtonsViewDemo/TableViewController.m index 85edbad..140b62d 100644 --- a/Demo/LGPlusButtonsViewDemo/TableViewController.m +++ b/Demo/LGPlusButtonsViewDemo/TableViewController.m @@ -25,8 +25,8 @@ - (id)init { self.title = @"LGPlusButtonsView"; - _titlesArray = @[@"UIView + Variant 1", - @"UIScrollView + Variant 2"]; + _titlesArray = @[@"UIView", + @"UIScrollView"]; [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cell"]; diff --git a/Demo/Podfile b/Demo/Podfile deleted file mode 100644 index dbda194..0000000 --- a/Demo/Podfile +++ /dev/null @@ -1,10 +0,0 @@ -source 'https://github.com/CocoaPods/Specs.git' - -platform :ios, '6.0' - -xcodeproj 'LGPlusButtonsViewDemo' - -target 'LGPlusButtonsViewDemo' do - pod 'LGPlusButtonsView', :path => '../' - pod 'LGDrawer', '~> 1.0.0' -end diff --git a/Demo/Podfile.lock b/Demo/Podfile.lock deleted file mode 100644 index c22ae44..0000000 --- a/Demo/Podfile.lock +++ /dev/null @@ -1,17 +0,0 @@ -PODS: - - LGDrawer (1.0.0) - - LGPlusButtonsView (1.0.5) - -DEPENDENCIES: - - LGDrawer (~> 1.0.0) - - LGPlusButtonsView (from `../`) - -EXTERNAL SOURCES: - LGPlusButtonsView: - :path: ../ - -SPEC CHECKSUMS: - LGDrawer: 14fa657d7e21842797a6187c44d5a913841d34a8 - LGPlusButtonsView: a99c8f6b55953faa0a15e0ce8b16690dac167d55 - -COCOAPODS: 0.39.0 diff --git a/Demo/podsInstall.command b/Demo/podsInstall.command deleted file mode 100644 index 3c76888..0000000 --- a/Demo/podsInstall.command +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -cd "$(dirname "$0")" - -pod install diff --git a/Demo/podsUpdate.command b/Demo/podsUpdate.command deleted file mode 100644 index f48a821..0000000 --- a/Demo/podsUpdate.command +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -cd "$(dirname "$0")" - -pod update diff --git a/Framework/LGPlusButtonsViewFramework.xcodeproj/project.pbxproj b/Framework/LGPlusButtonsViewFramework.xcodeproj/project.pbxproj new file mode 100644 index 0000000..b446121 --- /dev/null +++ b/Framework/LGPlusButtonsViewFramework.xcodeproj/project.pbxproj @@ -0,0 +1,312 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 4AF139701BF384800037B073 /* LGPlusButtonsViewFramework.h in Headers */ = {isa = PBXBuildFile; fileRef = 4AF1396F1BF384800037B073 /* LGPlusButtonsViewFramework.h */; }; + 4AF13A261BF3B0E10037B073 /* LGPlusButton.h in Headers */ = {isa = PBXBuildFile; fileRef = 4AF13A221BF3B0E10037B073 /* LGPlusButton.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4AF13A271BF3B0E10037B073 /* LGPlusButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 4AF13A231BF3B0E10037B073 /* LGPlusButton.m */; }; + 4AF13A281BF3B0E10037B073 /* LGPlusButtonsView.h in Headers */ = {isa = PBXBuildFile; fileRef = 4AF13A241BF3B0E10037B073 /* LGPlusButtonsView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 4AF13A291BF3B0E10037B073 /* LGPlusButtonsView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4AF13A251BF3B0E10037B073 /* LGPlusButtonsView.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 4AF1396C1BF384800037B073 /* LGPlusButtonsViewFramework.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = LGPlusButtonsViewFramework.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 4AF1396F1BF384800037B073 /* LGPlusButtonsViewFramework.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LGPlusButtonsViewFramework.h; sourceTree = ""; }; + 4AF139711BF384800037B073 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 4AF13A221BF3B0E10037B073 /* LGPlusButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LGPlusButton.h; sourceTree = ""; }; + 4AF13A231BF3B0E10037B073 /* LGPlusButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LGPlusButton.m; sourceTree = ""; }; + 4AF13A241BF3B0E10037B073 /* LGPlusButtonsView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LGPlusButtonsView.h; sourceTree = ""; }; + 4AF13A251BF3B0E10037B073 /* LGPlusButtonsView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LGPlusButtonsView.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 4AF139681BF384800037B073 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 4AF139621BF384800037B073 = { + isa = PBXGroup; + children = ( + 4AF13A211BF3B0E10037B073 /* LGPlusButtonsView */, + 4AF1396E1BF384800037B073 /* LGPlusButtonsViewFramework */, + 4AF1396D1BF384800037B073 /* Products */, + ); + sourceTree = ""; + }; + 4AF1396D1BF384800037B073 /* Products */ = { + isa = PBXGroup; + children = ( + 4AF1396C1BF384800037B073 /* LGPlusButtonsViewFramework.framework */, + ); + name = Products; + sourceTree = ""; + }; + 4AF1396E1BF384800037B073 /* LGPlusButtonsViewFramework */ = { + isa = PBXGroup; + children = ( + 4AF1396F1BF384800037B073 /* LGPlusButtonsViewFramework.h */, + 4AF139711BF384800037B073 /* Info.plist */, + ); + path = LGPlusButtonsViewFramework; + sourceTree = ""; + }; + 4AF13A211BF3B0E10037B073 /* LGPlusButtonsView */ = { + isa = PBXGroup; + children = ( + 4AF13A221BF3B0E10037B073 /* LGPlusButton.h */, + 4AF13A231BF3B0E10037B073 /* LGPlusButton.m */, + 4AF13A241BF3B0E10037B073 /* LGPlusButtonsView.h */, + 4AF13A251BF3B0E10037B073 /* LGPlusButtonsView.m */, + ); + name = LGPlusButtonsView; + path = ../LGPlusButtonsView; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 4AF139691BF384800037B073 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 4AF13A281BF3B0E10037B073 /* LGPlusButtonsView.h in Headers */, + 4AF13A261BF3B0E10037B073 /* LGPlusButton.h in Headers */, + 4AF139701BF384800037B073 /* LGPlusButtonsViewFramework.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 4AF1396B1BF384800037B073 /* LGPlusButtonsViewFramework */ = { + isa = PBXNativeTarget; + buildConfigurationList = 4AF139741BF384800037B073 /* Build configuration list for PBXNativeTarget "LGPlusButtonsViewFramework" */; + buildPhases = ( + 4AF139671BF384800037B073 /* Sources */, + 4AF139681BF384800037B073 /* Frameworks */, + 4AF139691BF384800037B073 /* Headers */, + 4AF1396A1BF384800037B073 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = LGPlusButtonsViewFramework; + productName = LGPlusButtonsViewFramework; + productReference = 4AF1396C1BF384800037B073 /* LGPlusButtonsViewFramework.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 4AF139631BF384800037B073 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0710; + ORGANIZATIONNAME = "Grigory Lutkov"; + TargetAttributes = { + 4AF1396B1BF384800037B073 = { + CreatedOnToolsVersion = 7.1.1; + }; + }; + }; + buildConfigurationList = 4AF139661BF384800037B073 /* Build configuration list for PBXProject "LGPlusButtonsViewFramework" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = 4AF139621BF384800037B073; + productRefGroup = 4AF1396D1BF384800037B073 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 4AF1396B1BF384800037B073 /* LGPlusButtonsViewFramework */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 4AF1396A1BF384800037B073 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 4AF139671BF384800037B073 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4AF13A271BF3B0E10037B073 /* LGPlusButton.m in Sources */, + 4AF13A291BF3B0E10037B073 /* LGPlusButtonsView.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 4AF139721BF384800037B073 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 4AF139731BF384800037B073 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 4AF139751BF384800037B073 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = LGPlusButtonsViewFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.Friend-LGA.LGPlusButtonsViewFramework"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Debug; + }; + 4AF139761BF384800037B073 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_IDENTITY = "iPhone Developer"; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = LGPlusButtonsViewFramework/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "com.Friend-LGA.LGPlusButtonsViewFramework"; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 4AF139661BF384800037B073 /* Build configuration list for PBXProject "LGPlusButtonsViewFramework" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4AF139721BF384800037B073 /* Debug */, + 4AF139731BF384800037B073 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 4AF139741BF384800037B073 /* Build configuration list for PBXNativeTarget "LGPlusButtonsViewFramework" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4AF139751BF384800037B073 /* Debug */, + 4AF139761BF384800037B073 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 4AF139631BF384800037B073 /* Project object */; +} diff --git a/Framework/LGPlusButtonsViewFramework.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Framework/LGPlusButtonsViewFramework.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..adf93d3 --- /dev/null +++ b/Framework/LGPlusButtonsViewFramework.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Framework/LGPlusButtonsViewFramework.xcodeproj/xcshareddata/xcschemes/LGPlusButtonsViewFramework.xcscheme b/Framework/LGPlusButtonsViewFramework.xcodeproj/xcshareddata/xcschemes/LGPlusButtonsViewFramework.xcscheme new file mode 100644 index 0000000..df11d3e --- /dev/null +++ b/Framework/LGPlusButtonsViewFramework.xcodeproj/xcshareddata/xcschemes/LGPlusButtonsViewFramework.xcscheme @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Framework/LGPlusButtonsViewFramework/Info.plist b/Framework/LGPlusButtonsViewFramework/Info.plist new file mode 100644 index 0000000..d3de8ee --- /dev/null +++ b/Framework/LGPlusButtonsViewFramework/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/Framework/LGPlusButtonsViewFramework/LGPlusButtonsViewFramework.h b/Framework/LGPlusButtonsViewFramework/LGPlusButtonsViewFramework.h new file mode 100644 index 0000000..a246a75 --- /dev/null +++ b/Framework/LGPlusButtonsViewFramework/LGPlusButtonsViewFramework.h @@ -0,0 +1,20 @@ +// +// LGPlusButtonsViewFramework.h +// LGPlusButtonsViewFramework +// +// Created by Grigory Lutkov on 11.11.15. +// Copyright © 2015 Grigory Lutkov. All rights reserved. +// + +#import + +//! Project version number for LGPlusButtonsViewFramework. +FOUNDATION_EXPORT double LGPlusButtonsViewFrameworkVersionNumber; + +//! Project version string for LGPlusButtonsViewFramework. +FOUNDATION_EXPORT const unsigned char LGPlusButtonsViewFrameworkVersionString[]; + +#pragma mark - + +#import +#import diff --git a/LGPlusButtonsView.podspec b/LGPlusButtonsView.podspec index 3375f1a..17f8b62 100644 --- a/LGPlusButtonsView.podspec +++ b/LGPlusButtonsView.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = 'LGPlusButtonsView' - s.version = '1.0.6' + s.version = '1.0.7' s.platform = :ios, '6.0' s.license = 'MIT' s.homepage = 'https://github.com/Friend-LGA/LGPlusButtonsView' diff --git a/LGPlusButtonsView/LGPlusButton.m b/LGPlusButtonsView/LGPlusButton.m index 55883bf..5bca8aa 100644 --- a/LGPlusButtonsView/LGPlusButton.m +++ b/LGPlusButtonsView/LGPlusButton.m @@ -82,6 +82,14 @@ - (void)layoutSubviews if (self.imageView.image) { CGSize imageViewSize = [self.imageView sizeThatFits:sizeToFit]; + if (imageViewSize.width > sizeToFit.width || imageViewSize.height > sizeToFit.height) + { + CGFloat aspect = imageViewSize.width/imageViewSize.height; + + imageViewSize.width = (imageViewSize.width > imageViewSize.height ? sizeToFit.width : sizeToFit.height); + imageViewSize.height = imageViewSize.width/aspect; + + } CGRect imageViewFrame = CGRectMake(selfFrame.size.width/2-imageViewSize.width/2+_imageOffset.x, selfFrame.size.height/2-imageViewSize.height/2+_imageOffset.y, imageViewSize.width, diff --git a/LGPlusButtonsView/LGPlusButtonsView.h b/LGPlusButtonsView/LGPlusButtonsView.h index 7b87c25..592c7df 100644 --- a/LGPlusButtonsView/LGPlusButtonsView.h +++ b/LGPlusButtonsView/LGPlusButtonsView.h @@ -150,6 +150,7 @@ typedef NS_ENUM(NSUInteger, LGPlusButtonAnimationType) - (void)setButtonsBackgroundColor:(UIColor *)backgroundColor forState:(UIControlState)state; - (void)setButtonsBackgroundColors:(NSArray *)backgroundColors forState:(UIControlState)state; - (void)setButtonsTitleFont:(UIFont *)font; +- (void)setButtonsImageViewContentMode:(UIViewContentMode)contentMode; #pragma mark - @@ -166,6 +167,7 @@ typedef NS_ENUM(NSUInteger, LGPlusButtonAnimationType) #pragma mark - +- (void)setButtonsLayerShouldRasterize:(BOOL)shouldRasterize; - (void)setButtonsLayerMasksToBounds:(BOOL)masksToBounds; - (void)setButtonsLayerCornerRadius:(CGFloat)cornerRadius; - (void)setButtonsLayerBorderColor:(UIColor *)borderColor borderWidth:(CGFloat)borderWidth; diff --git a/LGPlusButtonsView/LGPlusButtonsView.m b/LGPlusButtonsView/LGPlusButtonsView.m index 198e3c3..927ac19 100644 --- a/LGPlusButtonsView/LGPlusButtonsView.m +++ b/LGPlusButtonsView/LGPlusButtonsView.m @@ -458,6 +458,12 @@ - (void)setButtonsTitleFont:(UIFont *)font if (isChanged) [self layoutInvalidate]; } +- (void)setButtonsImageViewContentMode:(UIViewContentMode)contentMode +{ + for (LGPlusButton *button in _buttons) + button.imageView.contentMode = contentMode; +} + #pragma mark - - (void)setDescriptionsTexts:(NSArray *)texts @@ -547,6 +553,12 @@ - (void)setButtonsAdjustsImageWhenHighlighted:(BOOL)adjustsImageWhenHighlighted #pragma mark - +- (void)setButtonsLayerShouldRasterize:(BOOL)shouldRasterize +{ + for (LGPlusButton *button in _buttons) + button.layer.shouldRasterize = shouldRasterize; +} + - (void)setButtonsLayerMasksToBounds:(BOOL)masksToBounds { for (LGPlusButton *button in _buttons) diff --git a/README.md b/README.md index 7ac18ae..bc799da 100644 --- a/README.md +++ b/README.md @@ -17,13 +17,21 @@ iOS implementation of Floating Action Button (Google Plus Button, fab), that sho ### With CocoaPods -[CocoaPods](http://cocoapods.org/) is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries in your projects. See the "Get Started" section for more details. +CocoaPods is a dependency manager for Objective-C, which automates and simplifies the process of using 3rd-party libraries in your projects. To install with cocoaPods, follow the "Get Started" section on [CocoaPods](https://cocoapods.org/). #### Podfile +```ruby +platform :ios, '6.0' +pod 'LGPlusButtonsView', '~> 1.0' +``` + +### With Carthage +Carthage is a lightweight dependency manager for Swift and Objective-C. It leverages CocoaTouch modules and is less invasive than CocoaPods. To install with carthage, follow the instruction on [Carthage](https://github.com/Carthage/Carthage/). + +#### Cartfile ``` -platform :ios, '6.0' -pod 'LGPlusButtonsView', '~> 1.0.0' +github "Friend-LGA/LGPlusButtonsView" ~> 1.0 ``` ## Usage