2022/08/21

๐Ÿ’ป ๊ฐœ๋ฐœ/์˜ค๋Š˜์˜ ์‚ฝ์งˆ

[iOS / Swift] unable to dequeue a cell with identifier Cell - must register a nib or a class for the identifier or connect a prototype cell in a storyboard

TableView๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด์„œ Cell์„ ์žฌ์‚ฌ์šฉํ•˜๊ธฐ ์œ„ํ•ด extension์œผ๋กœ UITableViewDataSource๋ฅผ ์žฌ์ •์˜ํ•˜๊ณ  ๋นŒ๋“œ๋ฅผ ์ง„ํ–‰ํ–ˆ๋‹ค. extension ViewController : UITableViewDataSource { func tableView(_ tableView : UITableView, numberOfRowsInSection section : Int) -> Int { return self.tasks.count } func tableView(_ tableView : UITableView, cellForRowAt indexPath : IndexPath) -> UITableViewCell { let cell = tableView.dequeueReusableCell(withIdenti..

kodo_o
'2022/08/21 ๊ธ€ ๋ชฉ๋ก