Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Practical UICollectionView in iOS and Swift
Rating: 5.0 out of 5(1 rating)
32 students

Practical UICollectionView in iOS and Swift

Learn to harness power of UICollectionView and take control of your app's layout
Created byCGI GEN
Last updated 9/2020
English
English [Auto],

What you'll learn

  • Learn to use Collection Views in you app
  • Learn to add, delete move items in Collection Views
  • Learn to move item cells in Collection Views
  • Learn to create Collection Views programmatically
  • Learn to create custom layout for Collection Views
  • Learn to code layout screens with Swift 5

Course content

3 sections21 lectures3h 57m total length
  • Your very first collection view17:02

    Create your first collection view in iOS with Swift, wrapped in a navigation controller, and learn to configure a flow layout, data source, and delegate to display emoji in cells.

  • Setting number of columns and rows7:53

    Compute the collection view width, subtract the total inter-item spacing, then divide by the target number of columns to create evenly spaced square items with a flow layout.

  • Handling cell selection4:40

    Learn how to enable cell selection in a collection view by implementing didSelectItemAt, retrieving the tapped item via indexPath.item, and using the selection to drive updates, navigation, or detailed view.

  • Master Detail Screens12:01

    Learn how to build master detail screens with segues, passing selected data to a detail view controller, and handling view lifecycle to set labels after the view loads.

  • Adding new data and refresh control12:28

    Add new data to a collection view by tapping a plus button and inserting items at a calculated index path, enabling animated incremental updates and a refresh control.

  • Alternate approach for new data insert6:45

    Demonstrates inserting a new item by creating an index path and inserting at the start with animation, and shows passing data to a detail view via the selected index path.

  • Cell deletion plan2:41

    Create a custom collection view cell class to handle internal user interface, add a selected label, and implement a trash deletion flow removing items from the data store and collection.

  • Custom cell in Collection Views10:58

    Create a custom collection view cell with an item label and a circular select label to indicate selection; wire outlets and apply mask to bounds and corner radius for multi-select.

  • Cell editing mode13:10

    Enable editing mode in a collection view, add an edit button item, and support multi‑select by updating the cell state and label visibility.

  • Cell selection in edit mode part 17:20

    Learn how to implement cell selection in edit mode for a collection view in iOS with Swift, display a checkmark when selected, and troubleshoot reuse identifier and offset rendering issues.

  • Cell selection in edit mode part 24:01

    Enable multiple selection in a collection view during edit mode, display a checkmark with proper font and color, and save selected index paths while deselecting all items when exiting editing.

  • Cell deletion11:59

    Learn to implement cell deletion in a collection view by entering edit mode, showing a bottom navigation bar, and deleting items from the data source with back-to-front updates and animation.

  • Moving cells around9:46

    Learn how to enable interactive movement of collection view cells with canMoveItem(at:), moveItem(at:to:), and a long press gesture recognizer; update the data source and the collection view during drag.

Requirements

  • Basic knowledge of Swift
  • Basic Knowledge of Xcode
  • Basic Knowledge of iOS Development

Description

A collection view is a way to present an ordered set of data items using a flexible and changeable layout. The most common use for collection views is to present items in a grid-like arrangement, but collection views in iOS are capable of more than just rows and columns.

In this course you will learn to harness the power of Collection Views. Build an app from scratch, and customize it by creating and manipulating custom collection view cells. You will also learn how to create UICollectionViews programmatically and add supplemental views to display custom header for each section of your collection view.

This course is designed for anyone who wants to create flexible grid layout using collection views. This course takes practical approach by teaching you each aspect in order to create an efficient collection view along with tip and tricks associated with collection views.

Who this course is for:

  • Anyone with basic knowledge on iOS app development
  • Anyone who wants to use Collection Views in their app
  • Anyone who wants to learn Collection Views and its usage in Swift 5