diff --git a/RETableViewManager/RETableViewManager.h b/RETableViewManager/RETableViewManager.h index c4f9912..5e64e0e 100644 --- a/RETableViewManager/RETableViewManager.h +++ b/RETableViewManager/RETableViewManager.h @@ -48,11 +48,23 @@ @protocol RETableViewManagerDelegate; -/** - Returns device OS major version. - */ -NSUInteger REDeviceSystemMajorVersion(); -BOOL REDeviceIsUIKit7(); +static BOOL REDeviceIsUIKit7() +{ + static BOOL isUIKitFlatMode = NO; + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1) { + // If your app is running in legacy mode, tintColor will be nil - else it must be set to some color. + if (UIApplication.sharedApplication.keyWindow) { + isUIKitFlatMode = [UIApplication.sharedApplication.delegate.window performSelector:@selector(tintColor)] != nil; + } else { + // Possible that we're called early on (e.g. when used in a Storyboard). Adapt and use a temporary window. + isUIKitFlatMode = [[UIWindow new] performSelector:@selector(tintColor)] != nil; + } + } + }); + return isUIKitFlatMode; +} /** `RETableViewManager` allows to manage the content of any `UITableView` with ease, both forms and lists. `RETableViewManager` is built on top of reusable cells technique and provides diff --git a/RETableViewManager/RETableViewManager.m b/RETableViewManager/RETableViewManager.m index 38c6557..eefc4b1 100755 --- a/RETableViewManager/RETableViewManager.m +++ b/RETableViewManager/RETableViewManager.m @@ -25,23 +25,6 @@ #import "RETableViewManager.h" -BOOL REDeviceIsUIKit7() { - static BOOL isUIKitFlatMode = NO; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - if (floor(NSFoundationVersionNumber) > NSFoundationVersionNumber_iOS_6_1) { - // If your app is running in legacy mode, tintColor will be nil - else it must be set to some color. - if (UIApplication.sharedApplication.keyWindow) { - isUIKitFlatMode = [UIApplication.sharedApplication.delegate.window performSelector:@selector(tintColor)] != nil; - } else { - // Possible that we're called early on (e.g. when used in a Storyboard). Adapt and use a temporary window. - isUIKitFlatMode = [[UIWindow new] performSelector:@selector(tintColor)] != nil; - } - } - }); - return isUIKitFlatMode; -} - @interface RETableViewManager () /** diff --git a/RETableViewManagerExample/RETableViewManagerExample.xcworkspace/xcshareddata/RETableViewManagerExample.xccheckout b/RETableViewManagerExample/RETableViewManagerExample.xcworkspace/xcshareddata/RETableViewManagerExample.xccheckout deleted file mode 100644 index 54c3f43..0000000 --- a/RETableViewManagerExample/RETableViewManagerExample.xcworkspace/xcshareddata/RETableViewManagerExample.xccheckout +++ /dev/null @@ -1,41 +0,0 @@ - - - - - IDESourceControlProjectFavoriteDictionaryKey - - IDESourceControlProjectIdentifier - 8477F0B3-7B50-4DEE-9405-A3B6471912C9 - IDESourceControlProjectName - RETableViewManagerExample - IDESourceControlProjectOriginsDictionary - - 00213686-1ACC-46C9-9B90-2769BCA1244F - ssh://github.com/romaonthego/RETableViewManager.git - - IDESourceControlProjectPath - RETableViewManagerExample/RETableViewManagerExample.xcworkspace - IDESourceControlProjectRelativeInstallPathDictionary - - 00213686-1ACC-46C9-9B90-2769BCA1244F - ../.. - - IDESourceControlProjectURL - ssh://github.com/romaonthego/RETableViewManager.git - IDESourceControlProjectVersion - 110 - IDESourceControlProjectWCCIdentifier - 00213686-1ACC-46C9-9B90-2769BCA1244F - IDESourceControlProjectWCConfigurations - - - IDESourceControlRepositoryExtensionIdentifierKey - public.vcs.git - IDESourceControlWCCIdentifierKey - 00213686-1ACC-46C9-9B90-2769BCA1244F - IDESourceControlWCCName - RETableViewManager - - - -