From 87d3ae0e3e5a0e81c9c0ca627206f5b0a9c2ecd5 Mon Sep 17 00:00:00 2001 From: Michael Monscheuer Date: Fri, 14 Oct 2016 10:36:10 +0200 Subject: [PATCH 1/2] Update of project and info.plist (as Xcode 8 finally decided to do so) --- .../MMTabBarView.xcodeproj/project.pbxproj | 29 ++++++++++++++++++- .../MMTabBarView/MMTabBarView-Info.plist | 2 +- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/MMTabBarView/MMTabBarView.xcodeproj/project.pbxproj b/MMTabBarView/MMTabBarView.xcodeproj/project.pbxproj index 95c9bb3d..456e8f62 100644 --- a/MMTabBarView/MMTabBarView.xcodeproj/project.pbxproj +++ b/MMTabBarView/MMTabBarView.xcodeproj/project.pbxproj @@ -797,7 +797,7 @@ 06DB239C1609F5820071BDA0 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0510; + LastUpgradeCheck = 0800; ORGANIZATIONNAME = "Michael Monscheuer"; }; buildConfigurationList = 06DB239F1609F5820071BDA0 /* Build configuration list for PBXProject "MMTabBarView" */; @@ -985,11 +985,22 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -998,7 +1009,9 @@ GCC_SYMBOLS_PRIVATE_EXTERN = NO; 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; ONLY_ACTIVE_ARCH = YES; SDKROOT = macosx; @@ -1010,14 +1023,26 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_NO_COMMON_BLOCKS = YES; 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; SDKROOT = macosx; }; @@ -1034,6 +1059,7 @@ FRAMEWORK_VERSION = A; GCC_PREFIX_HEADER = "MMTabBarView/MMTabBarView-Prefix.pch"; INFOPLIST_FILE = "MMTabBarView/MMTabBarView-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "de.monscheuer.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = framework; }; @@ -1050,6 +1076,7 @@ FRAMEWORK_VERSION = A; GCC_PREFIX_HEADER = "MMTabBarView/MMTabBarView-Prefix.pch"; INFOPLIST_FILE = "MMTabBarView/MMTabBarView-Info.plist"; + PRODUCT_BUNDLE_IDENTIFIER = "de.monscheuer.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; WRAPPER_EXTENSION = framework; }; diff --git a/MMTabBarView/MMTabBarView/MMTabBarView-Info.plist b/MMTabBarView/MMTabBarView/MMTabBarView-Info.plist index 43670037..8a493678 100644 --- a/MMTabBarView/MMTabBarView/MMTabBarView-Info.plist +++ b/MMTabBarView/MMTabBarView/MMTabBarView-Info.plist @@ -9,7 +9,7 @@ CFBundleIconFile CFBundleIdentifier - de.monscheuer.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName From 60d5f99fba49fa72a8314cb3c0803757b4d8fc9d Mon Sep 17 00:00:00 2001 From: Michael Monscheuer Date: Fri, 14 Oct 2016 12:58:59 +0200 Subject: [PATCH 2/2] resolved compiler warnings --- MMTabBarView/MMTabBarView/MMAttachedTabBarButton.m | 2 +- MMTabBarView/MMTabBarView/MMTabBarButtonCell.m | 6 +++--- MMTabBarView/MMTabBarView/MMTabBarController.m | 1 + MMTabBarView/MMTabBarView/MMTabBarView.Private.h | 6 ++++++ 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/MMTabBarView/MMTabBarView/MMAttachedTabBarButton.m b/MMTabBarView/MMTabBarView/MMAttachedTabBarButton.m index c91fccce..f43d1a92 100644 --- a/MMTabBarView/MMTabBarView/MMAttachedTabBarButton.m +++ b/MMTabBarView/MMTabBarView/MMAttachedTabBarButton.m @@ -177,7 +177,7 @@ - (NSRect)draggingRect { NSRect draggingRect = NSZeroRect; - if (style && [style respondsToSelector:@selector(dragRectForTabButton:ofTabBarView:)]) { + if (style && [style respondsToSelector:@selector(draggingRectForTabButton:ofTabBarView:)]) { draggingRect = [style draggingRectForTabButton:self ofTabBarView:tabBarView]; } else { draggingRect = [self _draggingRect]; diff --git a/MMTabBarView/MMTabBarView/MMTabBarButtonCell.m b/MMTabBarView/MMTabBarView/MMTabBarButtonCell.m index 75a7a152..e8a2e51b 100644 --- a/MMTabBarView/MMTabBarView/MMTabBarButtonCell.m +++ b/MMTabBarView/MMTabBarView/MMTabBarButtonCell.m @@ -294,7 +294,7 @@ - (NSSize)objectCounterSize MMTabBarView *tabBarView = [self tabBarView]; id tabStyle = [tabBarView style]; - if ([tabStyle respondsToSelector:@selector(objectCounterSizeForTabCell:)]) { + if ([tabStyle respondsToSelector:@selector(objectCounterSizeOfTabCell:)]) { return [tabStyle objectCounterSizeOfTabCell:self]; } else { return [self _objectCounterSize]; @@ -341,7 +341,7 @@ - (NSRect)closeButtonRectForBounds:(NSRect)theRect { - (CGFloat)minimumWidthOfCell { id style = [self style]; - if ([style respondsToSelector:@selector(minimumWidthOfTabCell)]) { + if ([style respondsToSelector:@selector(minimumWidthOfTabCell:)]) { return [style minimumWidthOfTabCell:self]; } else { return [self _minimumWidthOfCell]; @@ -351,7 +351,7 @@ - (CGFloat)minimumWidthOfCell { - (CGFloat)desiredWidthOfCell { id style = [self style]; - if ([style respondsToSelector:@selector(desiredWidthOfTabCell)]) { + if ([style respondsToSelector:@selector(desiredWidthOfTabCell:)]) { return [style desiredWidthOfTabCell:self]; } else { return [self _desiredWidthOfCell]; diff --git a/MMTabBarView/MMTabBarView/MMTabBarController.m b/MMTabBarView/MMTabBarView/MMTabBarController.m index 86e082fa..e081ca0d 100755 --- a/MMTabBarView/MMTabBarView/MMTabBarController.m +++ b/MMTabBarView/MMTabBarView/MMTabBarController.m @@ -11,6 +11,7 @@ #import "MMAttachedTabBarButton.h" #import "MMTabStyle.h" #import "NSString+MMTabBarViewExtensions.h" +#import "MMTabBarView.Private.h" #define MAX_OVERFLOW_MENUITEM_TITLE_LENGTH 60 diff --git a/MMTabBarView/MMTabBarView/MMTabBarView.Private.h b/MMTabBarView/MMTabBarView/MMTabBarView.Private.h index e9d36848..48a58281 100644 --- a/MMTabBarView/MMTabBarView/MMTabBarView.Private.h +++ b/MMTabBarView/MMTabBarView/MMTabBarView.Private.h @@ -15,4 +15,10 @@ @property (assign) BOOL isReorderingTabViewItems; +#pragma mark Private Actions + +- (void)_overflowMenuAction:(id)sender; +- (void)_didClickTabButton:(id)sender; +- (void)_didClickCloseButton:(id)sender; + @end