Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 30 libdyld.dylib 0x00000001107a7575 start + 1
- override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
- let cellIdentifier = "CharacterTableViewCell"
- guard let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier, for: indexPath) as? CharacterTableViewCell else {
- fatalError("The dequeued cell is not an instance of CharacterTableViewCell")
- }
- let char = characterList[indexPath.row]
- cell.characterNameLabel.text = char.name
- cell.raceLabel.text = char.race
- cell.classLabel.text = char.cclass
- cell.backgroundLabel.text = char.background
- cell.photoImageView.image = char.photo
- // Configure the cell...
- return cell
- }
- private func loadSampleCharacters(){
- let photo1 = UIImage(named: "human")
- guard let character1 = Character(name: "Eravan", race: "Human", cclass: "Paladin", background: "Soldier", photo: photo1) else {
- fatalError("Unable to initiate Character 1")
- }
- characterList += [character1]
- }
Add Comment
Please, Sign In to add comment