Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

Commit

Permalink
Refactor to add support for custom layout delegates, drag & drop, and…
Browse files Browse the repository at this point in the history
… more

Refactor to add support for custom layout delegates
Support for drag & drop
Fix initial display issue
  • Loading branch information
apptekstudios authored Oct 31, 2019
2 parents 16657fa + d0a3b11 commit 901de00
Show file tree
Hide file tree
Showing 37 changed files with 1,980 additions and 833 deletions.
67 changes: 67 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/ASCollectionView.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1110"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ASCollectionView"
BuildableName = "ASCollectionView"
BlueprintName = "ASCollectionView"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ASCollectionView"
BuildableName = "ASCollectionView"
BlueprintName = "ASCollectionView"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@
<key>ASCollectionView.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
<integer>2</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>ASCollectionView</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
Expand Down
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
language: swift
osx_image: xcode11.2
install: (swift package update)
script:
- set -o pipefail
- xcodebuild -project Demo/ASCollectionViewDemo.xcodeproj -scheme ASCollectionView -destination platform\=iOS\ Simulator,OS\=13.2,name\=iPhone\ 11 build | xcpretty
70 changes: 66 additions & 4 deletions Demo/ASCollectionViewDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@
objects = {

/* Begin PBXBuildFile section */
B8268B522363EF03008C99A3 /* RemindersScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8268B512363EF03008C99A3 /* RemindersScreen.swift */; };
B8268B542363EF1B008C99A3 /* GroupLarge.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8268B532363EF1B008C99A3 /* GroupLarge.swift */; };
B8268B562363EF25008C99A3 /* GroupSmall.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8268B552363EF25008C99A3 /* GroupSmall.swift */; };
B8268B582363EF37008C99A3 /* GroupModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8268B572363EF37008C99A3 /* GroupModel.swift */; };
B8384F542366E9FD0049CA47 /* TagStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = B89129FD235DB71900D8BA90 /* TagStore.swift */; };
B86C6F17234B078600522AEF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B86C6F16234B078600522AEF /* AppDelegate.swift */; };
B86C6F19234B078600522AEF /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B86C6F18234B078600522AEF /* SceneDelegate.swift */; };
B86C6F1D234B078800522AEF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = B86C6F1C234B078800522AEF /* Assets.xcassets */; };
Expand All @@ -27,10 +32,16 @@
B86C6F4E234B0B9D00522AEF /* StoryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B86C6F41234B0B9D00522AEF /* StoryView.swift */; };
B86C6F4F234B0B9D00522AEF /* MainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = B86C6F42234B0B9D00522AEF /* MainView.swift */; };
B89129FE235DB71900D8BA90 /* TagsScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = B89129FC235DB71900D8BA90 /* TagsScreen.swift */; };
B89129FF235DB71900D8BA90 /* TagStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = B89129FD235DB71900D8BA90 /* TagStore.swift */; };
B8A95E3923607F850017A7EA /* CustomDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8A95E3823607F850017A7EA /* CustomDelegate.swift */; };
B8A95E3C2360800D0017A7EA /* MagazineLayout in Frameworks */ = {isa = PBXBuildFile; productRef = B8A95E3B2360800D0017A7EA /* MagazineLayout */; };
B8A95E3E236081500017A7EA /* MagazineLayoutScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8A95E3D236081500017A7EA /* MagazineLayoutScreen.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
B8268B512363EF03008C99A3 /* RemindersScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RemindersScreen.swift; sourceTree = "<group>"; };
B8268B532363EF1B008C99A3 /* GroupLarge.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupLarge.swift; sourceTree = "<group>"; };
B8268B552363EF25008C99A3 /* GroupSmall.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupSmall.swift; sourceTree = "<group>"; };
B8268B572363EF37008C99A3 /* GroupModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GroupModel.swift; sourceTree = "<group>"; };
B86C6F13234B078600522AEF /* ASCollectionViewDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ASCollectionViewDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
B86C6F16234B078600522AEF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
B86C6F18234B078600522AEF /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
Expand All @@ -54,20 +65,34 @@
B86C6F42234B0B9D00522AEF /* MainView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MainView.swift; sourceTree = "<group>"; };
B89129FC235DB71900D8BA90 /* TagsScreen.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TagsScreen.swift; sourceTree = "<group>"; };
B89129FD235DB71900D8BA90 /* TagStore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TagStore.swift; sourceTree = "<group>"; };
B8A95E3823607F850017A7EA /* CustomDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CustomDelegate.swift; sourceTree = "<group>"; };
B8A95E3D236081500017A7EA /* MagazineLayoutScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MagazineLayoutScreen.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
B86C6F10234B078600522AEF /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
B8A95E3C2360800D0017A7EA /* MagazineLayout in Frameworks */,
B86C6F2F234B0B8600522AEF /* ASCollectionView in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
B8268B502363EEF0008C99A3 /* Reminders */ = {
isa = PBXGroup;
children = (
B8268B512363EF03008C99A3 /* RemindersScreen.swift */,
B8268B572363EF37008C99A3 /* GroupModel.swift */,
B8268B532363EF1B008C99A3 /* GroupLarge.swift */,
B8268B552363EF25008C99A3 /* GroupSmall.swift */,
);
path = Reminders;
sourceTree = "<group>";
};
B86C6F0A234B078600522AEF = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -133,15 +158,15 @@
isa = PBXGroup;
children = (
B86C6F36234B0B9D00522AEF /* Post.swift */,
B86C6F37234B0B9D00522AEF /* App.swift */,
B89129FD235DB71900D8BA90 /* TagStore.swift */,
);
path = Models;
sourceTree = "<group>";
};
B86C6F38234B0B9D00522AEF /* Screens */ = {
isa = PBXGroup;
children = (
B8268B502363EEF0008C99A3 /* Reminders */,
B8A95E3723607F760017A7EA /* MagazineLayout */,
B89129FB235DB6ED00D8BA90 /* Tags */,
B86C6F39234B0B9D00522AEF /* PhotoGrid */,
B86C6F3B234B0B9D00522AEF /* AppStore */,
Expand All @@ -161,6 +186,7 @@
B86C6F3B234B0B9D00522AEF /* AppStore */ = {
isa = PBXGroup;
children = (
B86C6F37234B0B9D00522AEF /* App.swift */,
B86C6F3C234B0B9D00522AEF /* AppStoreScreen.swift */,
B86C6F3D234B0B9D00522AEF /* AppViews.swift */,
);
Expand All @@ -180,11 +206,21 @@
B89129FB235DB6ED00D8BA90 /* Tags */ = {
isa = PBXGroup;
children = (
B89129FD235DB71900D8BA90 /* TagStore.swift */,
B89129FC235DB71900D8BA90 /* TagsScreen.swift */,
);
path = Tags;
sourceTree = "<group>";
};
B8A95E3723607F760017A7EA /* MagazineLayout */ = {
isa = PBXGroup;
children = (
B8A95E3D236081500017A7EA /* MagazineLayoutScreen.swift */,
B8A95E3823607F850017A7EA /* CustomDelegate.swift */,
);
path = MagazineLayout;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand All @@ -203,6 +239,7 @@
name = ASCollectionViewDemo;
packageProductDependencies = (
B86C6F2E234B0B8600522AEF /* ASCollectionView */,
B8A95E3B2360800D0017A7EA /* MagazineLayout */,
);
productName = ASCollectionViewDemo;
productReference = B86C6F13234B078600522AEF /* ASCollectionViewDemo.app */;
Expand Down Expand Up @@ -232,6 +269,9 @@
Base,
);
mainGroup = B86C6F0A234B078600522AEF;
packageReferences = (
B8A95E3A2360800D0017A7EA /* XCRemoteSwiftPackageReference "MagazineLayout" */,
);
productRefGroup = B86C6F14234B078600522AEF /* Products */;
projectDirPath = "";
projectRoot = "";
Expand Down Expand Up @@ -259,6 +299,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
B8268B542363EF1B008C99A3 /* GroupLarge.swift in Sources */,
B86C6F44234B0B9D00522AEF /* ASCache.swift in Sources */,
B86C6F4B234B0B9D00522AEF /* AppViews.swift in Sources */,
B89129FE235DB71900D8BA90 /* TagsScreen.swift in Sources */,
Expand All @@ -267,15 +308,20 @@
B86C6F46234B0B9D00522AEF /* LoremSwiftum.swift in Sources */,
B86C6F45234B0B9D00522AEF /* ASRemoteImageManager.swift in Sources */,
B86C6F4A234B0B9D00522AEF /* AppStoreScreen.swift in Sources */,
B8268B582363EF37008C99A3 /* GroupModel.swift in Sources */,
B86C6F48234B0B9D00522AEF /* App.swift in Sources */,
B8268B522363EF03008C99A3 /* RemindersScreen.swift in Sources */,
B86C6F47234B0B9D00522AEF /* Post.swift in Sources */,
B89129FF235DB71900D8BA90 /* TagStore.swift in Sources */,
B86C6F49234B0B9D00522AEF /* PhotoGridScreen.swift in Sources */,
B86C6F4E234B0B9D00522AEF /* StoryView.swift in Sources */,
B86C6F4D234B0B9D00522AEF /* InstaFeedScreen.swift in Sources */,
B86C6F4C234B0B9D00522AEF /* PostView.swift in Sources */,
B8384F542366E9FD0049CA47 /* TagStore.swift in Sources */,
B86C6F4F234B0B9D00522AEF /* MainView.swift in Sources */,
B86C6F19234B078600522AEF /* SceneDelegate.swift in Sources */,
B8A95E3E236081500017A7EA /* MagazineLayoutScreen.swift in Sources */,
B8A95E3923607F850017A7EA /* CustomDelegate.swift in Sources */,
B8268B562363EF25008C99A3 /* GroupSmall.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -470,11 +516,27 @@
};
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
B8A95E3A2360800D0017A7EA /* XCRemoteSwiftPackageReference "MagazineLayout" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/airbnb/MagazineLayout";
requirement = {
branch = master;
kind = branch;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
B86C6F2E234B0B8600522AEF /* ASCollectionView */ = {
isa = XCSwiftPackageProductDependency;
productName = ASCollectionView;
};
B8A95E3B2360800D0017A7EA /* MagazineLayout */ = {
isa = XCSwiftPackageProductDependency;
package = B8A95E3A2360800D0017A7EA /* XCRemoteSwiftPackageReference "MagazineLayout" */;
productName = MagazineLayout;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = B86C6F0B234B078600522AEF /* Project object */;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"object": {
"pins": [
{
"package": "MagazineLayout",
"repositoryURL": "https://github.com/airbnb/MagazineLayout",
"state": {
"branch": "master",
"revision": "61fd38f770fb1b635fe486a6670381061424ff80",
"version": null
}
}
]
},
"version": 1
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1120"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B86C6F12234B078600522AEF"
BuildableName = "ASCollectionViewDemo.app"
BlueprintName = "ASCollectionViewDemo"
ReferencedContainer = "container:ASCollectionViewDemo.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B86C6F12234B078600522AEF"
BuildableName = "ASCollectionViewDemo.app"
BlueprintName = "ASCollectionViewDemo"
ReferencedContainer = "container:ASCollectionViewDemo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B86C6F12234B078600522AEF"
BuildableName = "ASCollectionViewDemo.app"
BlueprintName = "ASCollectionViewDemo"
ReferencedContainer = "container:ASCollectionViewDemo.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Loading

0 comments on commit 901de00

Please sign in to comment.