diff --git a/ALActionBlocks.podspec b/ALActionBlocks.podspec deleted file mode 100644 index 4f41c1f..0000000 --- a/ALActionBlocks.podspec +++ /dev/null @@ -1,13 +0,0 @@ -Pod::Spec.new do |s| - s.name = "ALActionBlocks" - s.version = "1.0.3" - s.summary = "ALActionBlocks Category on UIControl, UIBarButtonItem, and UIGestureRecognizer to allow use of blocks instead of selectors." - s.homepage = "https://github.com/lavoy/ALActionBlocks" - s.license = { :type => "MIT", :file => 'LICENSE' } - s.author = { "Andy LaVoy" => "andy@logcabinapps.com" } - s.source = { :git => "https://github.com/lavoy/ALActionBlocks.git", :tag => "1.0.3" } - s.platform = :ios, '5.0' - s.source_files = 'ALActionBlocks', 'ALActionBlocks/*.{h,m}' - s.framework = 'Foundation' - s.requires_arc = true -end diff --git a/Demo/ALActionBlocks.xcodeproj/project.pbxproj b/Demo/ALActionBlocks.xcodeproj/project.pbxproj deleted file mode 100644 index 4b4e5e3..0000000 --- a/Demo/ALActionBlocks.xcodeproj/project.pbxproj +++ /dev/null @@ -1,338 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - A10AE4821745784800EEC209 /* UIBarButtonItem+ALActionBlocks.m in Sources */ = {isa = PBXBuildFile; fileRef = A10AE4811745784800EEC209 /* UIBarButtonItem+ALActionBlocks.m */; }; - A10AE48B17457FCB00EEC209 /* ALActionBlockWrapper.m in Sources */ = {isa = PBXBuildFile; fileRef = A10AE48A17457FCB00EEC209 /* ALActionBlockWrapper.m */; }; - A1AE07C1170741AC0028A95E /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1AE07C0170741AC0028A95E /* UIKit.framework */; }; - A1AE07C3170741AC0028A95E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1AE07C2170741AC0028A95E /* Foundation.framework */; }; - A1AE07C5170741AC0028A95E /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A1AE07C4170741AC0028A95E /* CoreGraphics.framework */; }; - A1AE07CB170741AC0028A95E /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = A1AE07C9170741AC0028A95E /* InfoPlist.strings */; }; - A1AE07CD170741AC0028A95E /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = A1AE07CC170741AC0028A95E /* main.m */; }; - A1AE07D1170741AC0028A95E /* ALAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A1AE07D0170741AC0028A95E /* ALAppDelegate.m */; }; - A1AE07D3170741AC0028A95E /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = A1AE07D2170741AC0028A95E /* Default.png */; }; - A1AE07D5170741AC0028A95E /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A1AE07D4170741AC0028A95E /* Default@2x.png */; }; - A1AE07D7170741AC0028A95E /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = A1AE07D6170741AC0028A95E /* Default-568h@2x.png */; }; - A1AE07DA170741AC0028A95E /* ALViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A1AE07D9170741AC0028A95E /* ALViewController.m */; }; - A1C48A15181060B500734781 /* UIGestureRecognizer+ALActionBlocks.m in Sources */ = {isa = PBXBuildFile; fileRef = A1C48A14181060B500734781 /* UIGestureRecognizer+ALActionBlocks.m */; }; - A1F120D11733050400363A8F /* UIControl+ALActionBlocks.m in Sources */ = {isa = PBXBuildFile; fileRef = A1F120D01733050400363A8F /* UIControl+ALActionBlocks.m */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - A10AE4801745784800EEC209 /* UIBarButtonItem+ALActionBlocks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIBarButtonItem+ALActionBlocks.h"; sourceTree = ""; }; - A10AE4811745784800EEC209 /* UIBarButtonItem+ALActionBlocks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIBarButtonItem+ALActionBlocks.m"; sourceTree = ""; }; - A10AE48617457EFC00EEC209 /* ALActionBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALActionBlock.h; sourceTree = ""; }; - A10AE48917457FCB00EEC209 /* ALActionBlockWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALActionBlockWrapper.h; sourceTree = ""; }; - A10AE48A17457FCB00EEC209 /* ALActionBlockWrapper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ALActionBlockWrapper.m; sourceTree = ""; }; - A1AE07BD170741AC0028A95E /* ALActionBlocks.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ALActionBlocks.app; sourceTree = BUILT_PRODUCTS_DIR; }; - A1AE07C0170741AC0028A95E /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - A1AE07C2170741AC0028A95E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - A1AE07C4170741AC0028A95E /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - A1AE07C8170741AC0028A95E /* ALActionBlocks-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ALActionBlocks-Info.plist"; sourceTree = ""; }; - A1AE07CA170741AC0028A95E /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - A1AE07CC170741AC0028A95E /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - A1AE07CE170741AC0028A95E /* ALActionBlocks-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ALActionBlocks-Prefix.pch"; sourceTree = ""; }; - A1AE07CF170741AC0028A95E /* ALAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ALAppDelegate.h; sourceTree = ""; }; - A1AE07D0170741AC0028A95E /* ALAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ALAppDelegate.m; sourceTree = ""; }; - A1AE07D2170741AC0028A95E /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; - A1AE07D4170741AC0028A95E /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; - A1AE07D6170741AC0028A95E /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; - A1AE07D8170741AC0028A95E /* ALViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ALViewController.h; sourceTree = ""; }; - A1AE07D9170741AC0028A95E /* ALViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ALViewController.m; sourceTree = ""; }; - A1C48A13181060B500734781 /* UIGestureRecognizer+ALActionBlocks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIGestureRecognizer+ALActionBlocks.h"; sourceTree = ""; }; - A1C48A14181060B500734781 /* UIGestureRecognizer+ALActionBlocks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIGestureRecognizer+ALActionBlocks.m"; sourceTree = ""; }; - A1F120CF1733050400363A8F /* UIControl+ALActionBlocks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIControl+ALActionBlocks.h"; sourceTree = ""; }; - A1F120D01733050400363A8F /* UIControl+ALActionBlocks.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIControl+ALActionBlocks.m"; sourceTree = ""; }; - A1F120D21733052200363A8F /* ALActionBlocks.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ALActionBlocks.h; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - A1AE07BA170741AC0028A95E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - A1AE07C1170741AC0028A95E /* UIKit.framework in Frameworks */, - A1AE07C3170741AC0028A95E /* Foundation.framework in Frameworks */, - A1AE07C5170741AC0028A95E /* CoreGraphics.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - A1AE07B4170741AC0028A95E = { - isa = PBXGroup; - children = ( - A1AE07C6170741AC0028A95E /* ALActionBlocks */, - A1AE07BF170741AC0028A95E /* Frameworks */, - A1AE07BE170741AC0028A95E /* Products */, - ); - sourceTree = ""; - }; - A1AE07BE170741AC0028A95E /* Products */ = { - isa = PBXGroup; - children = ( - A1AE07BD170741AC0028A95E /* ALActionBlocks.app */, - ); - name = Products; - sourceTree = ""; - }; - A1AE07BF170741AC0028A95E /* Frameworks */ = { - isa = PBXGroup; - children = ( - A1AE07C0170741AC0028A95E /* UIKit.framework */, - A1AE07C2170741AC0028A95E /* Foundation.framework */, - A1AE07C4170741AC0028A95E /* CoreGraphics.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - A1AE07C6170741AC0028A95E /* ALActionBlocks */ = { - isa = PBXGroup; - children = ( - A1AE07CF170741AC0028A95E /* ALAppDelegate.h */, - A1AE07D0170741AC0028A95E /* ALAppDelegate.m */, - A1AE07D8170741AC0028A95E /* ALViewController.h */, - A1AE07D9170741AC0028A95E /* ALViewController.m */, - A1F120CE1733050400363A8F /* ALActionBlocks */, - A1AE07C7170741AC0028A95E /* Supporting Files */, - ); - path = ALActionBlocks; - sourceTree = ""; - }; - A1AE07C7170741AC0028A95E /* Supporting Files */ = { - isa = PBXGroup; - children = ( - A1AE07C8170741AC0028A95E /* ALActionBlocks-Info.plist */, - A1AE07C9170741AC0028A95E /* InfoPlist.strings */, - A1AE07CC170741AC0028A95E /* main.m */, - A1AE07CE170741AC0028A95E /* ALActionBlocks-Prefix.pch */, - A1AE07D2170741AC0028A95E /* Default.png */, - A1AE07D4170741AC0028A95E /* Default@2x.png */, - A1AE07D6170741AC0028A95E /* Default-568h@2x.png */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - A1F120CE1733050400363A8F /* ALActionBlocks */ = { - isa = PBXGroup; - children = ( - A1F120D21733052200363A8F /* ALActionBlocks.h */, - A10AE48617457EFC00EEC209 /* ALActionBlock.h */, - A10AE48917457FCB00EEC209 /* ALActionBlockWrapper.h */, - A10AE48A17457FCB00EEC209 /* ALActionBlockWrapper.m */, - A10AE4801745784800EEC209 /* UIBarButtonItem+ALActionBlocks.h */, - A10AE4811745784800EEC209 /* UIBarButtonItem+ALActionBlocks.m */, - A1F120CF1733050400363A8F /* UIControl+ALActionBlocks.h */, - A1F120D01733050400363A8F /* UIControl+ALActionBlocks.m */, - A1C48A13181060B500734781 /* UIGestureRecognizer+ALActionBlocks.h */, - A1C48A14181060B500734781 /* UIGestureRecognizer+ALActionBlocks.m */, - ); - name = ALActionBlocks; - path = ../../ALActionBlocks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - A1AE07BC170741AC0028A95E /* ALActionBlocks */ = { - isa = PBXNativeTarget; - buildConfigurationList = A1AE07E3170741AC0028A95E /* Build configuration list for PBXNativeTarget "ALActionBlocks" */; - buildPhases = ( - A1AE07B9170741AC0028A95E /* Sources */, - A1AE07BA170741AC0028A95E /* Frameworks */, - A1AE07BB170741AC0028A95E /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = ALActionBlocks; - productName = ALActionBlocks; - productReference = A1AE07BD170741AC0028A95E /* ALActionBlocks.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - A1AE07B5170741AC0028A95E /* Project object */ = { - isa = PBXProject; - attributes = { - CLASSPREFIX = AL; - LastUpgradeCheck = 0460; - ORGANIZATIONNAME = "Andy LaVoy"; - }; - buildConfigurationList = A1AE07B8170741AC0028A95E /* Build configuration list for PBXProject "ALActionBlocks" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = A1AE07B4170741AC0028A95E; - productRefGroup = A1AE07BE170741AC0028A95E /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - A1AE07BC170741AC0028A95E /* ALActionBlocks */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - A1AE07BB170741AC0028A95E /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A1AE07CB170741AC0028A95E /* InfoPlist.strings in Resources */, - A1AE07D3170741AC0028A95E /* Default.png in Resources */, - A1AE07D5170741AC0028A95E /* Default@2x.png in Resources */, - A1AE07D7170741AC0028A95E /* Default-568h@2x.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - A1AE07B9170741AC0028A95E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - A1AE07CD170741AC0028A95E /* main.m in Sources */, - A1C48A15181060B500734781 /* UIGestureRecognizer+ALActionBlocks.m in Sources */, - A1AE07D1170741AC0028A95E /* ALAppDelegate.m in Sources */, - A1AE07DA170741AC0028A95E /* ALViewController.m in Sources */, - A1F120D11733050400363A8F /* UIControl+ALActionBlocks.m in Sources */, - A10AE4821745784800EEC209 /* UIBarButtonItem+ALActionBlocks.m in Sources */, - A10AE48B17457FCB00EEC209 /* ALActionBlockWrapper.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXVariantGroup section */ - A1AE07C9170741AC0028A95E /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - A1AE07CA170741AC0028A95E /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - A1AE07E1170741AC0028A95E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 6.1; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - A1AE07E2170741AC0028A95E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 6.1; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - A1AE07E4170741AC0028A95E /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "ALActionBlocks/ALActionBlocks-Prefix.pch"; - INFOPLIST_FILE = "ALActionBlocks/ALActionBlocks-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = 1; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - A1AE07E5170741AC0028A95E /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "ALActionBlocks/ALActionBlocks-Prefix.pch"; - INFOPLIST_FILE = "ALActionBlocks/ALActionBlocks-Info.plist"; - IPHONEOS_DEPLOYMENT_TARGET = 7.0; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = 1; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - A1AE07B8170741AC0028A95E /* Build configuration list for PBXProject "ALActionBlocks" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A1AE07E1170741AC0028A95E /* Debug */, - A1AE07E2170741AC0028A95E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - A1AE07E3170741AC0028A95E /* Build configuration list for PBXNativeTarget "ALActionBlocks" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A1AE07E4170741AC0028A95E /* Debug */, - A1AE07E5170741AC0028A95E /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = A1AE07B5170741AC0028A95E /* Project object */; -} diff --git a/Demo/ALActionBlocks/ALActionBlocks-Info.plist b/Demo/ALActionBlocks/ALActionBlocks-Info.plist deleted file mode 100644 index 1492225..0000000 --- a/Demo/ALActionBlocks/ALActionBlocks-Info.plist +++ /dev/null @@ -1,45 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - com.andylavoy.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/Demo/ALActionBlocks/ALActionBlocks-Prefix.pch b/Demo/ALActionBlocks/ALActionBlocks-Prefix.pch deleted file mode 100644 index 7ec1f3d..0000000 --- a/Demo/ALActionBlocks/ALActionBlocks-Prefix.pch +++ /dev/null @@ -1,14 +0,0 @@ -// -// Prefix header for all source files of the 'ALActionBlocks' target in the 'ALActionBlocks' project -// - -#import - -#ifndef __IPHONE_4_0 -#warning "This project uses features only available in iOS SDK 4.0 and later." -#endif - -#ifdef __OBJC__ - #import - #import -#endif diff --git a/Demo/ALActionBlocks/ALAppDelegate.h b/Demo/ALActionBlocks/ALAppDelegate.h deleted file mode 100644 index 259b3e5..0000000 --- a/Demo/ALActionBlocks/ALAppDelegate.h +++ /dev/null @@ -1,17 +0,0 @@ -// -// ALAppDelegate.h -// ALActionBlocks -// -// Created by Andy LaVoy on 3/30/13. -// Copyright (c) 2013 Andy LaVoy. All rights reserved. -// - -#import - -@class ALViewController; - -@interface ALAppDelegate : UIResponder - -@property (strong, nonatomic) UIWindow *window; - -@end diff --git a/Demo/ALActionBlocks/ALAppDelegate.m b/Demo/ALActionBlocks/ALAppDelegate.m deleted file mode 100644 index afc9c6e..0000000 --- a/Demo/ALActionBlocks/ALAppDelegate.m +++ /dev/null @@ -1,59 +0,0 @@ -// -// ALAppDelegate.m -// ALActionBlocks -// -// Created by Andy LaVoy on 3/30/13. -// Copyright (c) 2013 Andy LaVoy. All rights reserved. -// - -#import "ALAppDelegate.h" -#import "ALViewController.h" - -@interface ALAppDelegate () - -@property (strong, nonatomic) UINavigationController *navController; - -@end - -@implementation ALAppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; - - ALViewController *viewController = [[ALViewController alloc] init]; - self.navController = [[UINavigationController alloc] initWithRootViewController:viewController]; - - self.window.rootViewController = self.navController; - [self.window makeKeyAndVisible]; - return YES; -} - -- (void)applicationWillResignActive:(UIApplication *)application -{ - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. -} - -- (void)applicationDidEnterBackground:(UIApplication *)application -{ - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. -} - -- (void)applicationWillEnterForeground:(UIApplication *)application -{ - // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. -} - -- (void)applicationDidBecomeActive:(UIApplication *)application -{ - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. -} - -- (void)applicationWillTerminate:(UIApplication *)application -{ - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. -} - -@end diff --git a/Demo/ALActionBlocks/ALViewController.h b/Demo/ALActionBlocks/ALViewController.h deleted file mode 100644 index c02c71d..0000000 --- a/Demo/ALActionBlocks/ALViewController.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// ALViewController.h -// ALActionBlocks -// -// Created by Andy LaVoy on 3/30/13. -// Copyright (c) 2013 Andy LaVoy. All rights reserved. -// - -#import - -@interface ALViewController : UIViewController - -@end diff --git a/Demo/ALActionBlocks/ALViewController.m b/Demo/ALActionBlocks/ALViewController.m deleted file mode 100644 index 0ea3776..0000000 --- a/Demo/ALActionBlocks/ALViewController.m +++ /dev/null @@ -1,75 +0,0 @@ -// -// ALViewController.m -// ALActionBlocks -// -// Created by Andy LaVoy on 3/30/13. -// Copyright (c) 2013 Andy LaVoy. All rights reserved. -// - -#import "ALViewController.h" -#import "ALActionBlocks.h" - -@interface ALViewController () - -@property (nonatomic, strong) UIButton *button; - -@end - -@implementation ALViewController - -- (void)viewDidLoad { - [super viewDidLoad]; - - self.view.backgroundColor = [UIColor whiteColor]; - self.title = @"ALActionBlocks"; - - self.button = [UIButton buttonWithType:UIButtonTypeRoundedRect]; - self.button.frame = CGRectMake(60, 44 + 64, 200, 44); - [self.button setTitle:@"Start" forState:UIControlStateNormal]; - [self.button handleControlEvents:UIControlEventTouchUpInside withBlock:^(UIButton *weakButton) { - NSLog(@"buttton pressed: %@", [weakButton titleForState:UIControlStateNormal]); - }]; - [self.view addSubview:self.button]; - - UISwitch *aSwitch = [[UISwitch alloc] initWithFrame:CGRectMake(120, 132 + 64, 0, 0)]; - [aSwitch handleControlEvents:UIControlEventValueChanged withBlock:^(id weakControl) { - NSLog(@"value: %d", aSwitch.isOn); - }]; - [self.view addSubview:aSwitch]; - - UISegmentedControl *segmentedControl = [[UISegmentedControl alloc] initWithItems:@[@"One", @"Two", @"Three"]]; - segmentedControl.frame = CGRectMake(88, 220 + 64, 143, 30); - [segmentedControl handleControlEvents:UIControlEventValueChanged withBlock:^(id weakControl) { - NSLog(@"selected segment: %@", [segmentedControl titleForSegmentAtIndex:segmentedControl.selectedSegmentIndex]); - if (segmentedControl.selectedSegmentIndex == 2) { - NSLog(@"removing action block"); - [segmentedControl removeActionBlocksForControlEvents:UIControlEventValueChanged]; - } - }]; - [self.view addSubview:segmentedControl]; - - self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Boom!" style:UIBarButtonItemStyleDone block:^(UIBarButtonItem *weakButton) { - NSLog(@"%@", [NSString stringWithFormat:@"%@", weakButton.title]); - }]; - self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemAdd block:^(id weakSender) { - NSLog(@"add"); - }]; - - UIToolbar *toolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, self.view.frame.size.height - 44, self.view.frame.size.width, 44)]; - [self.view addSubview:toolbar]; - - UIBarButtonItem *powButton = [[UIBarButtonItem alloc] init]; - [powButton setTitle:@"Pow!"]; - [powButton setBlock:^(id weakSender) { - NSLog(@"pow!"); - }]; - [toolbar setItems:@[powButton]]; - - __weak ALViewController *wSelf = self; - UIPanGestureRecognizer *gr = [[UIPanGestureRecognizer alloc] initWithBlock:^(UIPanGestureRecognizer *weakGR) { - NSLog(@"pan %@", NSStringFromCGPoint([weakGR locationInView:wSelf.view])); - }]; - [self.view addGestureRecognizer:gr]; -} - -@end diff --git a/Demo/ALActionBlocks/Default-568h@2x.png b/Demo/ALActionBlocks/Default-568h@2x.png deleted file mode 100644 index 0891b7a..0000000 Binary files a/Demo/ALActionBlocks/Default-568h@2x.png and /dev/null differ diff --git a/Demo/ALActionBlocks/Default.png b/Demo/ALActionBlocks/Default.png deleted file mode 100644 index 4c8ca6f..0000000 Binary files a/Demo/ALActionBlocks/Default.png and /dev/null differ diff --git a/Demo/ALActionBlocks/Default@2x.png b/Demo/ALActionBlocks/Default@2x.png deleted file mode 100644 index 35b84cf..0000000 Binary files a/Demo/ALActionBlocks/Default@2x.png and /dev/null differ diff --git a/Demo/ALActionBlocks/en.lproj/InfoPlist.strings b/Demo/ALActionBlocks/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28f..0000000 --- a/Demo/ALActionBlocks/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/Demo/ALActionBlocks/main.m b/Demo/ALActionBlocks/main.m deleted file mode 100644 index a463b7a..0000000 --- a/Demo/ALActionBlocks/main.m +++ /dev/null @@ -1,18 +0,0 @@ -// -// main.m -// ALActionBlocks -// -// Created by Andy LaVoy on 3/30/13. -// Copyright (c) 2013 Andy LaVoy. All rights reserved. -// - -#import - -#import "ALAppDelegate.h" - -int main(int argc, char *argv[]) -{ - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([ALAppDelegate class])); - } -} diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..2e06ff1 --- /dev/null +++ b/Package.swift @@ -0,0 +1,18 @@ +// swift-tools-version: 5.7 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "ALActionBlocks", + products: [ + .library( + name: "ALActionBlocks", + targets: ["ALActionBlocks"]), + ], + targets: [ + .target( + name: "ALActionBlocks", + dependencies: []), + ] +) diff --git a/README.md b/README.md index 03f98b4..1054e7e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # ALActionBlocks +This is a fork of ALActionBlocks, forked from https://github.com/lavoy/ALActionBlocks to use as a Swift Package. + ALActionBlocks is an Objective-C category on UIControl, UIBarButtonItem, and UIGestureRecognizer that allows for handling of control events with blocks. - Handle control events with blocks diff --git a/ALActionBlocks/ALActionBlockWrapper.m b/Sources/ALActionBlocks/Source/ALActionBlockWrapper.m similarity index 100% rename from ALActionBlocks/ALActionBlockWrapper.m rename to Sources/ALActionBlocks/Source/ALActionBlockWrapper.m diff --git a/ALActionBlocks/UIBarButtonItem+ALActionBlocks.m b/Sources/ALActionBlocks/Source/UIBarButtonItem+ALActionBlocks.m similarity index 100% rename from ALActionBlocks/UIBarButtonItem+ALActionBlocks.m rename to Sources/ALActionBlocks/Source/UIBarButtonItem+ALActionBlocks.m diff --git a/ALActionBlocks/UIControl+ALActionBlocks.m b/Sources/ALActionBlocks/Source/UIControl+ALActionBlocks.m similarity index 100% rename from ALActionBlocks/UIControl+ALActionBlocks.m rename to Sources/ALActionBlocks/Source/UIControl+ALActionBlocks.m diff --git a/ALActionBlocks/UIGestureRecognizer+ALActionBlocks.m b/Sources/ALActionBlocks/Source/UIGestureRecognizer+ALActionBlocks.m similarity index 100% rename from ALActionBlocks/UIGestureRecognizer+ALActionBlocks.m rename to Sources/ALActionBlocks/Source/UIGestureRecognizer+ALActionBlocks.m diff --git a/ALActionBlocks/ALActionBlock.h b/Sources/ALActionBlocks/include/ALActionBlock.h similarity index 100% rename from ALActionBlocks/ALActionBlock.h rename to Sources/ALActionBlocks/include/ALActionBlock.h diff --git a/ALActionBlocks/ALActionBlockWrapper.h b/Sources/ALActionBlocks/include/ALActionBlockWrapper.h similarity index 94% rename from ALActionBlocks/ALActionBlockWrapper.h rename to Sources/ALActionBlocks/include/ALActionBlockWrapper.h index 0442364..c0c90f3 100644 --- a/ALActionBlocks/ALActionBlockWrapper.h +++ b/Sources/ALActionBlocks/include/ALActionBlockWrapper.h @@ -7,6 +7,7 @@ // #import +#import #import "ALActionBlock.h" static NSString *const ALActionBlocksArray = @"ALActionBlocksArray"; @@ -18,4 +19,4 @@ static NSString *const ALActionBlocksArray = @"ALActionBlocksArray"; - (void)invokeBlock:(id)sender; -@end \ No newline at end of file +@end diff --git a/ALActionBlocks/ALActionBlocks.h b/Sources/ALActionBlocks/include/ALActionBlocks.h similarity index 100% rename from ALActionBlocks/ALActionBlocks.h rename to Sources/ALActionBlocks/include/ALActionBlocks.h diff --git a/ALActionBlocks/UIBarButtonItem+ALActionBlocks.h b/Sources/ALActionBlocks/include/UIBarButtonItem+ALActionBlocks.h similarity index 100% rename from ALActionBlocks/UIBarButtonItem+ALActionBlocks.h rename to Sources/ALActionBlocks/include/UIBarButtonItem+ALActionBlocks.h diff --git a/ALActionBlocks/UIControl+ALActionBlocks.h b/Sources/ALActionBlocks/include/UIControl+ALActionBlocks.h similarity index 100% rename from ALActionBlocks/UIControl+ALActionBlocks.h rename to Sources/ALActionBlocks/include/UIControl+ALActionBlocks.h diff --git a/ALActionBlocks/UIGestureRecognizer+ALActionBlocks.h b/Sources/ALActionBlocks/include/UIGestureRecognizer+ALActionBlocks.h similarity index 100% rename from ALActionBlocks/UIGestureRecognizer+ALActionBlocks.h rename to Sources/ALActionBlocks/include/UIGestureRecognizer+ALActionBlocks.h