iOS & Swift 공부 - UITableView (영)

김영채 (Kevin)·2021년 1월 26일
0

iOS & Swift

목록 보기
47/107
  • Add a Table View first and then add a Table View Cell on top of it


  • This will create a Prototype cell that will be reused a bunch of times.

  • It's important to give the sell a unique identifier to later easily access it through code

→ Consider making a Constants.swift file to keep track of identifiers using type properties (ex. static let identifier = Reusable cell)

  • Connect the table view object to your view controller

  • Let your view controller conform to the protocol called "UITableViewDataSource"

  • You need to set the datasource = self.

note: You can also conform to the UITableViewDelegate as well

  • Implement the methods needed to fully conform to the aforementioned protocol

  • Simulator example

profile
맛있는 iOS 프로그래밍

0개의 댓글