Post

Replies

Boosts

Views

Activity

Reply to Guided Project: Apple Pie
OS 15 update seems to have changed some button behavior. You can use sender.titleLable!.text! instead of sender.title(for: normal)! sender.configuration!.text! also works. Also changing the button style from plain to default may solve the problem. It is better here to use a guard.
Mar ’22
Reply to Apple Pie Guided Project: getting error - Thread 1: Fatal error: Unexpectedly found nil while unwrapping an Optional value.
let letterString = sender.title(for: .normal)! no longer works as of the IOS15 update. You can do this: let letterString = sender.titleLabel!.text! or this: let letterString = sender.configuration!.text! to fix the issue. But you should probably be using a guard here. guard let letterString = sender.configuration?.text else { return print("error unwrapping button title") } That way the app doesn't crash (it still doesn't work, but it doesn't crash, so you're moving in the right direction).
Mar ’22