diff --git a/Example/Podfile b/Example/Podfile index a77328c..0b1c822 100644 --- a/Example/Podfile +++ b/Example/Podfile @@ -1,6 +1,6 @@ source 'https://github.com/CocoaPods/Specs.git' use_frameworks! -platform :ios, '8.0' +platform :ios, '9.0' target 'TRMosaicLayout_Example' do pod 'TRMosaicLayout', :path => '../' diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 9b6c9b4..e77b76a 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -14,7 +14,7 @@ PODS: - AFNetworking/Serialization (3.1.0) - AFNetworking/UIKit (3.1.0): - AFNetworking/NSURLSession - - TRMosaicLayout (0.2.0) + - TRMosaicLayout (1.0.0) DEPENDENCIES: - AFNetworking @@ -22,12 +22,12 @@ DEPENDENCIES: EXTERNAL SOURCES: TRMosaicLayout: - :path: "../" + :path: ../ SPEC CHECKSUMS: AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67 - TRMosaicLayout: 2f1af0d457377ebc135912b658a65040be9e1651 + TRMosaicLayout: 16f29d2a3fe7e966def6e4369e0b9815821842fd -PODFILE CHECKSUM: e96d6eea1053de5262ca744bcf605356ee8c9f04 +PODFILE CHECKSUM: 3aadf19c450bf9615ab51ea88c6d09500c606f82 -COCOAPODS: 1.1.0.beta.2 +COCOAPODS: 1.3.1 diff --git a/Example/TRMosaicLayout.xcodeproj/project.pbxproj b/Example/TRMosaicLayout.xcodeproj/project.pbxproj index 0c492bc..9e1cf70 100644 --- a/Example/TRMosaicLayout.xcodeproj/project.pbxproj +++ b/Example/TRMosaicLayout.xcodeproj/project.pbxproj @@ -14,6 +14,9 @@ 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; }; 71F849A951C8BDD4723D7D28 /* Pods_TRMosaicLayout_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C23F83B87EC869807E2B5656 /* Pods_TRMosaicLayout_Tests.framework */; }; + 7E42B00A1FE2792F0059C58F /* TRMosaicColumn.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E42AFFA1FE278C20059C58F /* TRMosaicColumn.swift */; }; + 7E42B00B1FE2792F0059C58F /* TRMosaicLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7E42AFFB1FE278C20059C58F /* TRMosaicLayout.swift */; }; + 7E42B0121FE27B110059C58F /* TRMosaicLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 7E42B0111FE27B110059C58F /* TRMosaicLayout.h */; settings = {ATTRIBUTES = (Public, ); }; }; BF2FE1891D2753AF00094919 /* TRCollectionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF2FE1881D2753AF00094919 /* TRCollectionViewController.swift */; }; /* End PBXBuildFile section */ @@ -70,6 +73,13 @@ 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; 6C3C84ADD8703237720DAA60 /* Pods_TRMosaicLayout_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_TRMosaicLayout_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 7E42AFFA1FE278C20059C58F /* TRMosaicColumn.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TRMosaicColumn.swift; sourceTree = ""; }; + 7E42AFFB1FE278C20059C58F /* TRMosaicLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TRMosaicLayout.swift; sourceTree = ""; }; + 7E42AFFC1FE278C20059C58F /* .gitkeep */ = {isa = PBXFileReference; lastKnownFileType = text; path = .gitkeep; sourceTree = ""; }; + 7E42B0021FE278F50059C58F /* TRMosaicLayout.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TRMosaicLayout.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 7E42B0041FE278F50059C58F /* TRMosaicLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TRMosaicLayout.h; sourceTree = ""; }; + 7E42B0051FE278F50059C58F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 7E42B0111FE27B110059C58F /* TRMosaicLayout.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TRMosaicLayout.h; sourceTree = ""; }; B7CC935F4F35463C77300DCB /* Pods-TRMosaicLayout_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-TRMosaicLayout_Tests.release.xcconfig"; path = "Pods/Target Support Files/Pods-TRMosaicLayout_Tests/Pods-TRMosaicLayout_Tests.release.xcconfig"; sourceTree = ""; }; BF2FE1881D2753AF00094919 /* TRCollectionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TRCollectionViewController.swift; sourceTree = ""; }; BFAF1FEE1D2759D800DA4FEF /* Pods.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Pods.xcodeproj; path = Pods/Pods.xcodeproj; sourceTree = ""; }; @@ -95,6 +105,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 7E42AFFE1FE278F50059C58F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -115,7 +132,9 @@ BFAF1FEE1D2759D800DA4FEF /* Pods.xcodeproj */, 607FACF51AFB993E008FA782 /* Podspec Metadata */, 607FACD21AFB9204008FA782 /* Example for TRMosaicLayout */, + 7E42AFF91FE278C20059C58F /* Classes */, 607FACE81AFB9204008FA782 /* Tests */, + 7E42B0031FE278F50059C58F /* TRMosaicLayout */, 607FACD11AFB9204008FA782 /* Products */, 5182DD7EB3CE3DABD4D10FCA /* Pods */, F2F1B1D5BB5AF46BFA43D016 /* Frameworks */, @@ -127,6 +146,7 @@ children = ( 607FACD01AFB9204008FA782 /* TRMosaicLayout_Example.app */, 607FACE51AFB9204008FA782 /* TRMosaicLayout_Tests.xctest */, + 7E42B0021FE278F50059C58F /* TRMosaicLayout.framework */, ); name = Products; sourceTree = ""; @@ -180,6 +200,27 @@ name = "Podspec Metadata"; sourceTree = ""; }; + 7E42AFF91FE278C20059C58F /* Classes */ = { + isa = PBXGroup; + children = ( + 7E42B0111FE27B110059C58F /* TRMosaicLayout.h */, + 7E42AFFA1FE278C20059C58F /* TRMosaicColumn.swift */, + 7E42AFFB1FE278C20059C58F /* TRMosaicLayout.swift */, + 7E42AFFC1FE278C20059C58F /* .gitkeep */, + ); + name = Classes; + path = ../TRMosaicLayout/Classes; + sourceTree = ""; + }; + 7E42B0031FE278F50059C58F /* TRMosaicLayout */ = { + isa = PBXGroup; + children = ( + 7E42B0041FE278F50059C58F /* TRMosaicLayout.h */, + 7E42B0051FE278F50059C58F /* Info.plist */, + ); + path = TRMosaicLayout; + sourceTree = ""; + }; BFAF1FEF1D2759D800DA4FEF /* Products */ = { isa = PBXGroup; children = ( @@ -202,6 +243,17 @@ }; /* End PBXGroup section */ +/* Begin PBXHeadersBuildPhase section */ + 7E42AFFF1FE278F50059C58F /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 7E42B0121FE27B110059C58F /* TRMosaicLayout.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + /* Begin PBXNativeTarget section */ 607FACCF1AFB9204008FA782 /* TRMosaicLayout_Example */ = { isa = PBXNativeTarget; @@ -244,6 +296,24 @@ productReference = 607FACE51AFB9204008FA782 /* TRMosaicLayout_Tests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; + 7E42B0011FE278F50059C58F /* TRMosaicLayout */ = { + isa = PBXNativeTarget; + buildConfigurationList = 7E42B0071FE278F50059C58F /* Build configuration list for PBXNativeTarget "TRMosaicLayout" */; + buildPhases = ( + 7E42AFFD1FE278F50059C58F /* Sources */, + 7E42AFFE1FE278F50059C58F /* Frameworks */, + 7E42AFFF1FE278F50059C58F /* Headers */, + 7E42B0001FE278F50059C58F /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = TRMosaicLayout; + productName = TRMosaicLayout; + productReference = 7E42B0021FE278F50059C58F /* TRMosaicLayout.framework */; + productType = "com.apple.product-type.framework"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -251,19 +321,24 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 1000; ORGANIZATIONNAME = CocoaPods; TargetAttributes = { 607FACCF1AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; - DevelopmentTeam = 95A278Q567; - LastSwiftMigration = 0800; + LastSwiftMigration = 0910; + ProvisioningStyle = Automatic; }; 607FACE41AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 0910; TestTargetID = 607FACCF1AFB9204008FA782; }; + 7E42B0011FE278F50059C58F = { + CreatedOnToolsVersion = 9.1; + LastSwiftMigration = 1000; + ProvisioningStyle = Automatic; + }; }; }; buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "TRMosaicLayout" */; @@ -287,6 +362,7 @@ targets = ( 607FACCF1AFB9204008FA782 /* TRMosaicLayout_Example */, 607FACE41AFB9204008FA782 /* TRMosaicLayout_Tests */, + 7E42B0011FE278F50059C58F /* TRMosaicLayout */, ); }; /* End PBXProject section */ @@ -340,6 +416,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 7E42B0001FE278F50059C58F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ @@ -394,9 +477,14 @@ files = ( ); inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-TRMosaicLayout_Example/Pods-TRMosaicLayout_Example-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/AFNetworking/AFNetworking.framework", + "${BUILT_PRODUCTS_DIR}/TRMosaicLayout/TRMosaicLayout.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AFNetworking.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/TRMosaicLayout.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -409,13 +497,16 @@ files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-TRMosaicLayout_Example-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; E679B6D6FB98C2DD1CAC0813 /* [CP] Check Pods Manifest.lock */ = { @@ -424,13 +515,16 @@ files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-TRMosaicLayout_Tests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -453,6 +547,15 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 7E42AFFD1FE278F50059C58F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7E42B00A1FE2792F0059C58F /* TRMosaicColumn.swift in Sources */, + 7E42B00B1FE2792F0059C58F /* TRMosaicLayout.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ @@ -491,14 +594,22 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 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_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; 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; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -539,14 +650,22 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 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_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; 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; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -578,14 +697,18 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_TEAM = 95A278Q567; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = TRMosaicLayout/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -595,14 +718,18 @@ buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - DEVELOPMENT_TEAM = 95A278Q567; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CODE_SIGN_STYLE = Automatic; + DEVELOPMENT_TEAM = ""; INFOPLIST_FILE = TRMosaicLayout/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 10.0; + IPHONEOS_DEPLOYMENT_TARGET = 10.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; }; name = Release; }; @@ -622,7 +749,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -638,7 +766,84 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; + }; + name = Release; + }; + 7E42B0081FE278F50059C58F /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_C_LANGUAGE_STANDARD = gnu11; + INFOPLIST_FILE = ../TRMosaicLayout/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.TRMosaicLayout; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 7E42B0091FE278F50059C58F /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CODE_SIGN_IDENTITY = "iPhone Developer"; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_C_LANGUAGE_STANDARD = gnu11; + INFOPLIST_FILE = ../TRMosaicLayout/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.TRMosaicLayout; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_VERSION = 4.2; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; }; name = Release; }; @@ -672,6 +877,15 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; + 7E42B0071FE278F50059C58F /* Build configuration list for PBXNativeTarget "TRMosaicLayout" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 7E42B0081FE278F50059C58F /* Debug */, + 7E42B0091FE278F50059C58F /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; /* End XCConfigurationList section */ }; rootObject = 607FACC81AFB9204008FA782 /* Project object */; diff --git a/Example/TRMosaicLayout.xcodeproj/xcshareddata/xcschemes/TRMosaicLayout-Example.xcscheme b/Example/TRMosaicLayout.xcodeproj/xcshareddata/xcschemes/TRMosaicLayout.xcscheme similarity index 51% rename from Example/TRMosaicLayout.xcodeproj/xcshareddata/xcschemes/TRMosaicLayout-Example.xcscheme rename to Example/TRMosaicLayout.xcodeproj/xcshareddata/xcschemes/TRMosaicLayout.xcscheme index 79a4634..3d48375 100644 --- a/Example/TRMosaicLayout.xcodeproj/xcshareddata/xcschemes/TRMosaicLayout-Example.xcscheme +++ b/Example/TRMosaicLayout.xcodeproj/xcshareddata/xcschemes/TRMosaicLayout.xcscheme @@ -1,6 +1,6 @@ - - - - @@ -42,26 +28,7 @@ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> - - - - - - - - @@ -75,16 +42,15 @@ debugDocumentVersioning = "YES" debugServiceExtension = "internal" allowLocationSimulation = "YES"> - + - + @@ -94,16 +60,15 @@ savedToolIdentifier = "" useCustomWorkingDirectory = "NO" debugDocumentVersioning = "YES"> - + - + diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..a653410 --- /dev/null +++ b/Package.swift @@ -0,0 +1,16 @@ +// swift-tools-version:5.1 +import PackageDescription + +let package = Package( + name: "TRMosaicLayout", + platforms: [.iOS(.v13)], + products: [ + .library(name: "TRMosaicLayout", targets: ["TRMosaicLayout"]) + ], + targets: [ + .target( + name: "TRMosaicLayout", + path: "TRMosaicLayout/Classes" + ) + ] +) diff --git a/TRMosaicLayout/Classes/TRMosaicColumn.swift b/TRMosaicLayout/Classes/TRMosaicColumn.swift index b9263d4..fac6e29 100644 --- a/TRMosaicLayout/Classes/TRMosaicColumn.swift +++ b/TRMosaicLayout/Classes/TRMosaicColumn.swift @@ -6,6 +6,8 @@ // // +import UIKit + struct TRMosaicColumns { var columns:[TRMosaicColumn] diff --git a/TRMosaicLayout/Classes/TRMosaicLayout.h b/TRMosaicLayout/Classes/TRMosaicLayout.h new file mode 100644 index 0000000..528f28a --- /dev/null +++ b/TRMosaicLayout/Classes/TRMosaicLayout.h @@ -0,0 +1,19 @@ +// +// TRMosaicLayout.h +// TRMosaicLayout +// +// Created by 4D on 14/12/2017. +// Copyright © 2017 CocoaPods. All rights reserved. +// + +#import + +//! Project version number for TRMosaicLayout. +FOUNDATION_EXPORT double TRMosaicLayoutVersionNumber; + +//! Project version string for TRMosaicLayout. +FOUNDATION_EXPORT const unsigned char TRMosaicLayoutVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/TRMosaicLayout/Classes/TRMosaicLayout.swift b/TRMosaicLayout/Classes/TRMosaicLayout.swift index 9e444ca..ed6accd 100644 --- a/TRMosaicLayout/Classes/TRMosaicLayout.swift +++ b/TRMosaicLayout/Classes/TRMosaicLayout.swift @@ -55,11 +55,13 @@ open class TRMosaicLayout: UICollectionViewLayout { var lastBigCellOnLeftSide = false // Loops through all items in the first section, this layout has only one section - for cellIndex in 0.. 0 { + for cellIndex in 0.. (Bool, [IndexPath]) { let cellIndexPath = IndexPath(item: index, section: 0) - let cellType:TRMosaicCellType = mosaicCellType(index: cellIndexPath) + let cellType: TRMosaicCellType = mosaicCellType(index: cellIndexPath) var newBuffer = cellBuffer var newSide = bigCellSide diff --git a/TRMosaicLayout/Info.plist b/TRMosaicLayout/Info.plist new file mode 100644 index 0000000..1007fd9 --- /dev/null +++ b/TRMosaicLayout/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + +