
Master UI collection views with a practical introduction, covering data source, delegate, flow layout, and layouts, plus Pinterest and drag-and-drop concepts, all shown with programmatic constraints.
Create an Xcode project and add a collection view with a UI collection view flow layout. Implement auto layout in the app delegate using translatesAutoresizingMaskIntoConstraints = false and leading/trailing constraints.
Master UI collection view data source and delegate methods, register a collection view cell class, and fine-tune layout with the delegate flow layout to manage item sizes and constraints.
Build a drag and drop app with a complex layout. Implement the UI collection view dropped delegate, drag delegate, and the delegate flow layout and data storage protocols.
Set up a new Xcode project without a storyboard, configure the app delegate window, and display a collection view with a cyan background using a 101 by 101 flow layout.
Learn to display collection view cells by adopting the UI collection view data source and delegate flow layout, register cells, and size items as squares with code organized in extensions.
Add images to the assets, wire them into collection view cells with programmatic auto layout, and tune image content mode, clipping, spacing, and insets for a clean grid.
Fix a sizing bug in the UI collection view by using the full width minus insets and dividing by three for square cells.
Learn to begin a drag session in a collection view by implementing UICollectionViewDragDelegate, configuring item providers and drag items, and enabling drag interactions for cross-app and intra-cell drags.
Learn to implement UICollectionView drop delegates and drop proposals to decide move or copy operations, using destination index paths and drop coordinators, and reorder items with batch updates.
Learn to persist and reorder collection view items by dropping cells using performBatchUpdates with insertItems and deleteItems at indexPath in a Swift and Xcode workflow.
Enable dragging collection view cells to the end by calculating a destination index path using the current items count, ensuring safe insertion when dragged out of bounds.
Adjust the number of items in section to match your collection view’s actual items, revealing all cells. Learn insert rows, delete rows, and perform batch updates with delegate protocols.
Build a Pinterest-style layout with a highly customizable UI collection view flow, where images size to their actual dimensions, and learn how to set up the collection view on screen.
Set up a collection view in a view controller by creating a single-view iOS project, registering a cell, and implementing data source and delegate methods for a Pinterest-style layout.
Learn to create a two-column collection view by setting inter-item and line spacing to zero and adjusting content insets for a clean layout.
Place an image view in each collection view cell's content view, configure its content mode and clipping, and load images from assets to enable a Pinterest layout.
Create a custom UI collection view flow layout to achieve a Pinterest-style layout, initializing the layout, calling super.init, and integrating it with the collection view.
Learn how to provide layout attributes for elements in a Pinterest-style collection view, positioning cells with custom frames using layout attributes, index paths, and two-column width calculations.
Explore calculating column width and overriding collection view content size in a UICollectionView layout, using prepare to compute layout attributes, content width, insets, and multiple column configurations.
learn how to create collection view layout attributes inside the prepare method, map over attributes, and compute x and y offsets, column width, and photo height to render Pinterest-style layouts.
Wrap the x offset as an array and use a column variable to place photos on left or right in a collection view, iterating with index paths to map images.
Learn to compute dynamic image heights for a Pinterest-style layout in Swift using a protocol delegate that uses the collection view width, columns, and index path.
Learn to calculate the correct image height by using the image width, the collection view frame width, and a dynamic column ratio to preserve aspect ratio across multiple columns.
Make the collection view layout dynamic by calculating y offsets per column and wrapping to the next column as images are added, preventing overlaps.
Apply final refinements to a Pinterest-style two-column collection view by creating a custom cell, removing unused content insets, and using layout subviews to inset content and add rounded corners.
Learn to implement a Pinterest-style UI using a collection view flow, apply UI stack view properties, and enhance cells with labels and custom icons across two to three videos.
Learn to build a Pinterest-like UICollectionView cell by using vertical and horizontal UIStackView, adjust spacing, and set constraints for image and labels.
Add a custom UILabel to a horizontal stack view, style its font and color, and constrain with auto layout to a fixed height.
Add a Pinterest-style cell button by importing three icon sizes into assets, creating a UI button, and setting its image from the asset catalog with template rendering for tint color.
Explore additional courses at maxcodes.io, access discounted coupon codes, and leave an honest review to help improve future content while expanding your Swift and Xcode skills.
You probably already know how to use a collectionView and if you don't, keep reading.
With a solid 3 focus curriculum, this course will teach you how to build UICollectionViews even if you have no experience, all while taking you the top of the UICollectionView skill pyramid.
You will learn how to build advanced layouts using top Apple developer methods, protocols, and objects such as:
UICollectionViewLayout, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, UICollectionViewDragDelegate, UICollectionViewDropDelegate, and even UICollectionViewDropCoordinator.
And if this doesn't cover your needs, rest assured because your instructor, Maxcodes, periodically updates his courses based on review feedback, tweets, and personal messages.
Welcome to Advanced UICollectionViews by Maxcodes
Build the iOS Pinterest Layout - Collection Views in Swift