To populate collection view cells, you'll need some data. In this video, see how to put simple data into collection view cells, and all of the steps that are included with that process.
- [Instructor] Now let's look at…providing data to our table view cells.…So I'm going to close the assistant editor…and then use the jump bar…to head over to collectionviewcontroller.swift.…Now, in here, what I'm looking for…is these two methods right here:…number of sections and number of items in section.…If you've worked with a table view before,…these should look pretty familiar.…We can group cells into sections if we want…and we need to specify for each section…how many items are in that section.…
So I'm going to delete these warning comments…and then, for a number of sections, we'll return one.…So we'll just have one big section for everything…and for number of items in section,…I'm going to delete the warning and then let's just…put 20 in there for now.…Now let's go to this method right here,…which is collection view, cellForItemAtindexPath.…So we've already created the cell…and we're returning it.…So we need to go to this section to configure the cell.…I'm going to replace that comment with this statement.…
- Advanced UI controls
- Creating alert controllers
- Displaying web content
- Creating a collection view controller
- Creating a custom data type
- Creating tabbed apps
- Importing and setting icons for your apps
- Publishing your app to the App Store
Skill Level Beginner
iOS and watchOS App Development: Notificationswith Steven Lipton3h 45m Intermediate
1. Mastering Views
2. Display Web Content
3. Collection Views
4. Multi-View Templates
5. Publish an App
Next steps1m 21s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.