swift - Segmentation fault: 11 when assigning label value from array -
having hard time figuring out. can print value of array , can assign label string, can't assign label value array.
print(self.items[0]["username"]) // prints username fine cell.usernamelabel.text = "test" // works expected cell.usernamelabel.text = self.items[0]["username"] // throws segmentation fault:11 on compilation
i managed work downcasting:
cell.usernamelabel.text = self.items[0]["username"] as? string
Comments
Post a Comment