From 27403460e5c48e8d59706ad7414b2d793d29ab36 Mon Sep 17 00:00:00 2001 From: Ric Santos Date: Mon, 17 Jun 2013 11:16:33 +0930 Subject: [PATCH 1/5] updated build settings to enable recommended warnings --- GMGridView/GMGridView.xcodeproj/project.pbxproj | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/GMGridView/GMGridView.xcodeproj/project.pbxproj b/GMGridView/GMGridView.xcodeproj/project.pbxproj index 8758ee9..be6ea81 100644 --- a/GMGridView/GMGridView.xcodeproj/project.pbxproj +++ b/GMGridView/GMGridView.xcodeproj/project.pbxproj @@ -158,7 +158,7 @@ 78509309149FAC2E000787E4 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0430; + LastUpgradeCheck = 0460; }; buildConfigurationList = 7850930C149FAC2E000787E4 /* Build configuration list for PBXProject "GMGridView" */; compatibilityVersion = "Xcode 3.2"; @@ -199,6 +199,10 @@ ALWAYS_SEARCH_USER_PATHS = NO; ARCHS = "$(ARCHS_STANDARD_32_BIT)"; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; @@ -224,6 +228,10 @@ ALWAYS_SEARCH_USER_PATHS = NO; ARCHS = "$(ARCHS_STANDARD_32_BIT)"; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_THUMB_SUPPORT = NO; From 304a1008b8ea3982a23dba4bd18919ec174a2914 Mon Sep 17 00:00:00 2001 From: Ricardo Santos Date: Mon, 2 Dec 2013 08:38:35 +1030 Subject: [PATCH 2/5] =?UTF-8?q?Accepted=20Xcode=E2=80=99s=20suggestion=20t?= =?UTF-8?q?o=20update=20build=20settings.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GMGridView/GMGridView.xcodeproj/project.pbxproj | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/GMGridView/GMGridView.xcodeproj/project.pbxproj b/GMGridView/GMGridView.xcodeproj/project.pbxproj index be6ea81..d9fcb14 100644 --- a/GMGridView/GMGridView.xcodeproj/project.pbxproj +++ b/GMGridView/GMGridView.xcodeproj/project.pbxproj @@ -158,7 +158,7 @@ 78509309149FAC2E000787E4 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0460; + LastUpgradeCheck = 0500; }; buildConfigurationList = 7850930C149FAC2E000787E4 /* Build configuration list for PBXProject "GMGridView" */; compatibilityVersion = "Xcode 3.2"; @@ -197,9 +197,10 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = 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; @@ -214,10 +215,14 @@ GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_THUMB_SUPPORT = NO; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 4.0; + ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; }; name = Debug; @@ -226,9 +231,10 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = 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; @@ -236,8 +242,11 @@ GCC_C_LANGUAGE_STANDARD = gnu99; GCC_THUMB_SUPPORT = NO; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNDECLARED_SELECTOR = YES; GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; IPHONEOS_DEPLOYMENT_TARGET = 4.0; SDKROOT = iphoneos; @@ -248,7 +257,6 @@ 78509320149FAC2E000787E4 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; DSTROOT = /tmp/GMGridView.dst; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_THUMB_SUPPORT = NO; @@ -261,7 +269,6 @@ 78509321149FAC2E000787E4 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; DSTROOT = /tmp/GMGridView.dst; GCC_PRECOMPILE_PREFIX_HEADER = YES; GCC_THUMB_SUPPORT = NO; From 398714f0a2211b743709630c84aea23ff08f2710 Mon Sep 17 00:00:00 2001 From: Ricardo Santos Date: Thu, 5 Dec 2013 17:25:28 +1030 Subject: [PATCH 3/5] =?UTF-8?q?Fixed=20generic=20Xcode=20archive=20problem?= =?UTF-8?q?=20by=20moving=20=E2=80=98copy=20headers=E2=80=99=20from=20publ?= =?UTF-8?q?ic=20to=20private=20in=20the=20build=20phases.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- GMGridView/GMGridView.xcodeproj/project.pbxproj | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/GMGridView/GMGridView.xcodeproj/project.pbxproj b/GMGridView/GMGridView.xcodeproj/project.pbxproj index d9fcb14..5078ec9 100644 --- a/GMGridView/GMGridView.xcodeproj/project.pbxproj +++ b/GMGridView/GMGridView.xcodeproj/project.pbxproj @@ -12,13 +12,13 @@ 16A0361514A012EF0062437D /* UIView+GMGridViewAdditions.h in Headers */ = {isa = PBXBuildFile; fileRef = 16A0361314A012EF0062437D /* UIView+GMGridViewAdditions.h */; }; 16A0361614A012EF0062437D /* UIView+GMGridViewAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 16A0361414A012EF0062437D /* UIView+GMGridViewAdditions.m */; }; 78509316149FAC2E000787E4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 78509315149FAC2E000787E4 /* Foundation.framework */; }; - 78509341149FAC61000787E4 /* GMGridView-Constants.h in Headers */ = {isa = PBXBuildFile; fileRef = 78509335149FAC61000787E4 /* GMGridView-Constants.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 78509342149FAC61000787E4 /* GMGridView.h in Headers */ = {isa = PBXBuildFile; fileRef = 78509336149FAC61000787E4 /* GMGridView.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 78509341149FAC61000787E4 /* GMGridView-Constants.h in Headers */ = {isa = PBXBuildFile; fileRef = 78509335149FAC61000787E4 /* GMGridView-Constants.h */; }; + 78509342149FAC61000787E4 /* GMGridView.h in Headers */ = {isa = PBXBuildFile; fileRef = 78509336149FAC61000787E4 /* GMGridView.h */; }; 78509343149FAC61000787E4 /* GMGridView.m in Sources */ = {isa = PBXBuildFile; fileRef = 78509337149FAC61000787E4 /* GMGridView.m */; }; - 78509344149FAC61000787E4 /* GMGridViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 78509338149FAC61000787E4 /* GMGridViewCell.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 78509344149FAC61000787E4 /* GMGridViewCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 78509338149FAC61000787E4 /* GMGridViewCell.h */; }; 78509345149FAC61000787E4 /* GMGridViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 78509339149FAC61000787E4 /* GMGridViewCell.m */; }; - 78509346149FAC61000787E4 /* GMGridViewCell+Extended.h in Headers */ = {isa = PBXBuildFile; fileRef = 7850933A149FAC61000787E4 /* GMGridViewCell+Extended.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 78509347149FAC61000787E4 /* GMGridViewLayoutStrategies.h in Headers */ = {isa = PBXBuildFile; fileRef = 7850933B149FAC61000787E4 /* GMGridViewLayoutStrategies.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 78509346149FAC61000787E4 /* GMGridViewCell+Extended.h in Headers */ = {isa = PBXBuildFile; fileRef = 7850933A149FAC61000787E4 /* GMGridViewCell+Extended.h */; }; + 78509347149FAC61000787E4 /* GMGridViewLayoutStrategies.h in Headers */ = {isa = PBXBuildFile; fileRef = 7850933B149FAC61000787E4 /* GMGridViewLayoutStrategies.h */; }; 78509348149FAC61000787E4 /* GMGridViewLayoutStrategies.m in Sources */ = {isa = PBXBuildFile; fileRef = 7850933C149FAC61000787E4 /* GMGridViewLayoutStrategies.m */; }; 78509350149FAC71000787E4 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7850934D149FAC71000787E4 /* QuartzCore.framework */; }; 78509351149FAC71000787E4 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7850934E149FAC71000787E4 /* UIKit.framework */; }; @@ -122,13 +122,13 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( + 16A0361014A012E60062437D /* UIGestureRecognizer+GMGridViewAdditions.h in Headers */, + 16A0361514A012EF0062437D /* UIView+GMGridViewAdditions.h in Headers */, 78509341149FAC61000787E4 /* GMGridView-Constants.h in Headers */, 78509342149FAC61000787E4 /* GMGridView.h in Headers */, 78509344149FAC61000787E4 /* GMGridViewCell.h in Headers */, 78509346149FAC61000787E4 /* GMGridViewCell+Extended.h in Headers */, 78509347149FAC61000787E4 /* GMGridViewLayoutStrategies.h in Headers */, - 16A0361014A012E60062437D /* UIGestureRecognizer+GMGridViewAdditions.h in Headers */, - 16A0361514A012EF0062437D /* UIView+GMGridViewAdditions.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; From 7bf88ccf6bc398bda911db404861130737c0bf1d Mon Sep 17 00:00:00 2001 From: Ricardo Santos Date: Thu, 12 Dec 2013 14:17:21 +1030 Subject: [PATCH 4/5] Ref issue #68 - UIButton in GMGridViewCell not responding to events. Added in (slightly modified) fix as suggested by @mwyman to ignore tap gestures that land on instances of UIControl. --- GMGridView/GMGridView.m | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/GMGridView/GMGridView.m b/GMGridView/GMGridView.m index c362c29..cd641bc 100644 --- a/GMGridView/GMGridView.m +++ b/GMGridView/GMGridView.m @@ -527,6 +527,20 @@ - (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer return valid; } +- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch +{ + if ( gestureRecognizer == _tapGesture) { + if ( [touch.view isDescendantOfView:self] ) { + // Test if the touched view is a subview of a control + for ( UIView *view = touch.view ; view != self ; view = view.superview ) + if ( [view isKindOfClass:[UIControl class]] ) + return NO; + } + } + + return YES; +} + ////////////////////////////////////////////////////////////// #pragma mark Sorting gestures & logic ////////////////////////////////////////////////////////////// From fdf8f46f3d06bad7c9384c0fac257fc6394eeaf0 Mon Sep 17 00:00:00 2001 From: Andreas Wulf Date: Tue, 11 Mar 2014 16:03:49 +1030 Subject: [PATCH 5/5] Xcode 5.1 settings --- GMGridView/GMGridView.xcodeproj/project.pbxproj | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/GMGridView/GMGridView.xcodeproj/project.pbxproj b/GMGridView/GMGridView.xcodeproj/project.pbxproj index 5078ec9..5855ec6 100644 --- a/GMGridView/GMGridView.xcodeproj/project.pbxproj +++ b/GMGridView/GMGridView.xcodeproj/project.pbxproj @@ -197,6 +197,10 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = ( + armv7, + armv7s, + ); CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; @@ -231,6 +235,10 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ARCHS = ( + armv7, + armv7s, + ); CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_CONSTANT_CONVERSION = YES;