Swinflate
  • October 17, 2023

Description


Swinflate aims to encorporate a set of collection view layouts which provide a better and even more fluid experience in collection vieews . It is amongst the goals of this project to make it ruthlessly simple for you to use it in your application.

Available layouts


SWInflateLayout

SWHorizontalStackLayout

Requirements


  • Swift 4.2
  • Xcode 10+
  • iOS 11.0+

Installation


Swinflate is available for installation via Swift Package Manager and Carthage.

To install via Carthage, paste the next line your Cartfile:

github “https://github.com/VladIacobIonut/Swinflate” ~> 1.0.3

Usage


This layouts are designed to work with horizontal collection view of a single row and multiple columns.

  1. Before using it, please import it in the class where your collectionView lies.

import Swinflate

  1. To implement it, just pass an instance of one of the layout classes enumerated above to the constructor of the collectionView.
SWInflateLayout

collectionView = UICollectionView(frame: .zero, collectionViewLayout: SWInflateLayout())

SWHorizontalStackLayout

let stackLayout = SWHorizontalStackLayout()
stackLayout.hasStackEffect = true
collectionView = UICollectionView(frame: .zero, collectionViewLayout: stackLayout)

Note

  • This layout allow you to enable or disable the stack effect by setting the hasStackEffect property ( this property is false by default).
  • Both layouts allow you to enable or disable the paging effect by setting the isPagingEnabled property ( this property is true by default).
  1. You should also return the item size for your cells in the sizeForItem method of the UICollectionViewDelegateFlowLayout .

extension CustomLayoutViewController: UICollectionViewDelegateFlowLayout {
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
return CGSize(width: cellWidth, height: cellHeight)
}
}

GitHub


View Github

#autolayout #carthage #cocoa #cocoapod #cocoapods #cocoatouch #collection #collectionkit #collectionview #collectionviewcell #collectionviewlayout #dynamic #expandabletableview #hashtag #hashtags #ibinspectable #instagram #instagramanimation #ios #iosanimation #iosdevelopment #iossdk #iosswift #iosthirdparty #layout #objectivec #swift #swiftanimation #swiftcollection #swiftimage #swiftlibrary #swiftpackagemanager #swiftui #swiftuicomponents #table #tableview #tableviewcell #taglistview #tags #tagsview #uicollectionview #uicollectionviewanimation #uicollectionviewcell #uicollectionviewflowlayout #uicollectionviewlayout #uitableview #uitableviewcell #uitableviewcontroller #xcode
YOU MIGHT ALSO LIKE...
exyte

     

camerakit-ios

CameraKit helps you add reliable camera to your app quickly. Our open source camera platform provides consistent capture results, service ...

HybridCamera

[video width="192" height="416" mp4="https://swiftgit.com/wp-content/uploads/2024/12/68747470733a2f2f7261776769742e636f6d2f7374796c656b69742f696d672f6d61737465722f7669645f6564697465645f325f326d622e676966.mp4"][/video]

TakeASelfie

An iOS framework that uses the front camera, detects your face and takes a selfie. This api opens the front ...

iOS-Depth-Sampler

Code examples of Depth APIs in iOS