swift 테이블 뷰 만들기 예제 코드


swift 테이블 뷰 만들기 예제 코드

항목들을 간단하게 나타낼 수 있는 테이블 뷰를 만드는 코드 예제입니다. 전화번호부 같은 리스트를 떠올리면 될 것 같아요. 아래는 코드입니다. import UIKit class ViewController: UIViewController, UITableViewDelegate, UITableViewDataSource { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return 10 } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { let cell = UITableViewCell.init(style: .default, reuseIdentifier: "TableCellType1") cell.textLabel?.text = "\(indexPath.row)" re...


#siwft #코드 #테이블뷰

원문링크 : swift 테이블 뷰 만들기 예제 코드