diff --git a/Example/Podfile.lock b/Example/Podfile.lock index fe38d74..06ebb99 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,5 +1,5 @@ PODS: - - UIEmptyState (4.0.0) + - UIEmptyState (5.0.0) DEPENDENCIES: - UIEmptyState (from `../`) @@ -9,8 +9,8 @@ EXTERNAL SOURCES: :path: "../" SPEC CHECKSUMS: - UIEmptyState: a299e655ecb6fc077dfb503c375ef9a023103240 + UIEmptyState: ffd62f9923a67a2d53c31238f00e120be2cc231f PODFILE CHECKSUM: 2410e5e41e5d4570ddd34538c5ba93d5d35ce08c -COCOAPODS: 1.5.3 +COCOAPODS: 1.6.1 diff --git a/Example/UIEmptyStateExample.xcodeproj/project.pbxproj b/Example/UIEmptyStateExample.xcodeproj/project.pbxproj index 0116f63..c368f6b 100644 --- a/Example/UIEmptyStateExample.xcodeproj/project.pbxproj +++ b/Example/UIEmptyStateExample.xcodeproj/project.pbxproj @@ -139,20 +139,20 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0820; - LastUpgradeCheck = 0900; + LastUpgradeCheck = 1020; ORGANIZATIONNAME = "Luis Padron"; TargetAttributes = { A05AA1BD1E4560E800B851F7 = { CreatedOnToolsVersion = 8.2.1; DevelopmentTeam = 4FNMZ7SN42; - LastSwiftMigration = 0900; + LastSwiftMigration = 1020; ProvisioningStyle = Automatic; }; }; }; buildConfigurationList = A05AA1B91E4560E800B851F7 /* Build configuration list for PBXProject "UIEmptyStateExample" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, @@ -188,7 +188,7 @@ files = ( ); inputPaths = ( - "${SRCROOT}/Pods/Target Support Files/Pods-UIEmptyStateExample/Pods-UIEmptyStateExample-frameworks.sh", + "${PODS_ROOT}/Target Support Files/Pods-UIEmptyStateExample/Pods-UIEmptyStateExample-frameworks.sh", "${BUILT_PRODUCTS_DIR}/UIEmptyState/UIEmptyState.framework", ); name = "[CP] Embed Pods Frameworks"; @@ -197,7 +197,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-UIEmptyStateExample/Pods-UIEmptyStateExample-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-UIEmptyStateExample/Pods-UIEmptyStateExample-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; 7D72286EB8A21429E4DC3E74 /* [CP] Check Pods Manifest.lock */ = { @@ -258,6 +258,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -267,6 +268,7 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; @@ -274,6 +276,7 @@ CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -314,6 +317,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -323,6 +327,7 @@ CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; @@ -330,6 +335,7 @@ CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; @@ -369,8 +375,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.luispadron.UIEmptyStateExample; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -384,8 +389,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.luispadron.UIEmptyStateExample; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Off; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/UIEmptyState.podspec b/UIEmptyState.podspec index b6aaa17..3e8dd49 100644 --- a/UIEmptyState.podspec +++ b/UIEmptyState.podspec @@ -2,10 +2,10 @@ Pod::Spec.new do |s| s.name = "UIEmptyState" - s.version = "4.0.1" + s.version = "5.0.0" s.summary = "An empty state control to give visually appealing context when building iOS applications." s.description = <<-DESC - s.swift_version = '4.2' + s.swift_version = '5.0' Empty state control which gives context with either a message, image, and buttons to the user when ever there is a reason the state is empty. Easily conform to the protocol to provide a visually appealing view to an empty table view controller. DESC diff --git a/src/UIEmptyState.xcodeproj/project.pbxproj b/src/UIEmptyState.xcodeproj/project.pbxproj index 30930c1..f01e819 100644 --- a/src/UIEmptyState.xcodeproj/project.pbxproj +++ b/src/UIEmptyState.xcodeproj/project.pbxproj @@ -163,29 +163,28 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0820; - LastUpgradeCheck = 0930; + LastUpgradeCheck = 1020; ORGANIZATIONNAME = "Luis Padron"; TargetAttributes = { A0AABE4B1E3FED13006CD69C = { CreatedOnToolsVersion = 8.2.1; - DevelopmentTeam = 4FNMZ7SN42; - LastSwiftMigration = 0900; + LastSwiftMigration = 1020; ProvisioningStyle = Automatic; }; A0AABE541E3FED14006CD69C = { CreatedOnToolsVersion = 8.2.1; - DevelopmentTeam = 4FNMZ7SN42; - LastSwiftMigration = 0900; + LastSwiftMigration = 1020; ProvisioningStyle = Automatic; }; }; }; buildConfigurationList = A0AABE461E3FED13006CD69C /* Build configuration list for PBXProject "UIEmptyState" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, + Base, ); mainGroup = A0AABE421E3FED13006CD69C; productRefGroup = A0AABE4D1E3FED14006CD69C /* Products */; @@ -250,6 +249,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -312,6 +312,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -369,7 +370,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = 4FNMZ7SN42; + DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -381,8 +382,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -392,7 +392,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; DEFINES_MODULE = YES; - DEVELOPMENT_TEAM = 4FNMZ7SN42; + DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; @@ -403,8 +403,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.luispadron.UIEmptyState; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -412,13 +411,12 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - DEVELOPMENT_TEAM = 4FNMZ7SN42; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = UIEmptyStateTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.luispadron.UIEmptyStateTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -426,13 +424,12 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; - DEVELOPMENT_TEAM = 4FNMZ7SN42; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = UIEmptyStateTests/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.luispadron.UIEmptyStateTests; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_SWIFT3_OBJC_INFERENCE = Default; - SWIFT_VERSION = 4.0; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/src/UIEmptyState.xcodeproj/xcshareddata/xcschemes/UIEmptyState.xcscheme b/src/UIEmptyState.xcodeproj/xcshareddata/xcschemes/UIEmptyState.xcscheme index 684e260..7d68b98 100644 --- a/src/UIEmptyState.xcodeproj/xcshareddata/xcschemes/UIEmptyState.xcscheme +++ b/src/UIEmptyState.xcodeproj/xcshareddata/xcschemes/UIEmptyState.xcscheme @@ -1,6 +1,6 @@ =4.0) - let attrString = NSAttributedString(string: txt, attributes: [.font: self.font]) + let attrString = NSAttributedString(string: txt, attributes: [.font: self.font as Any]) #else let attrString = NSAttributedString(string: txt, attributes: [NSFontAttributeName: self.font]) #endif @@ -270,7 +270,7 @@ open class UIEmptyStateView: UIView { private func handleAdding(view: UIView) { // The order we want is 1. Image View, 2. Title Label, 3. Detail Label, 4. Button // If already added we can return - if contentView.subviews.index(of: view) != nil { return } + if contentView.subviews.firstIndex(of: view) != nil { return } // Tags correspond to the views AND the order we want them in switch view.tag {