From 0b6b2c70d9bca77946ad8eb594b09e43e4c036f5 Mon Sep 17 00:00:00 2001 From: Spencer Jones <67398650+mitschlagel@users.noreply.github.com> Date: Tue, 3 Feb 2026 19:55:53 +0000 Subject: [PATCH] Add package.swift --- Package.swift | 29 +++++++++++++++++++++++++++++ README.md | 16 +++++++++++++++- 2 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 Package.swift diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..0f1eea0 --- /dev/null +++ b/Package.swift @@ -0,0 +1,29 @@ +// swift-tools-version:5.5 +import PackageDescription + +let package = Package( + name: "CollectionLayouts", + platforms: [ + .iOS(.v10) + ], + products: [ + .library( + name: "StoriesLayout", + targets: ["StoriesLayout"] + ), + .library( + name: "SafariLayout", + targets: ["SafariLayout"] + ) + ], + targets: [ + .target( + name: "StoriesLayout", + path: "StoriesLayout/Classes" + ), + .target( + name: "SafariLayout", + path: "SafariLayout/Classes" + ) + ] +) \ No newline at end of file diff --git a/README.md b/README.md index 80c4f72..c019fed 100644 --- a/README.md +++ b/README.md @@ -28,10 +28,24 @@ This is a UICollectionViewLayout that reproduce the Instagram Stories experience just use StoriesCollectionViewLayout in your UICollectionView and subclass your cells from StoriesCollectionViewCell! ### Installation -* Via cocoapods: + +**via Cocoapods:** + ```ruby pod 'StoriesLayout' ``` +**via Swift Package Manager:** + +Add the package in Xcode: **File > Add Packages…** and use: + +``` +https://github.com/Oni-zerone/CollectionLayouts +``` + +Then import one of: +- `StoriesLayout` +- `SafariLayout` + ### Usage You can find more info about usage in the [wiki](https://github.com/Oni-zerone/CollectionLayouts/wiki/StoriesLayout)