Post

Replies

Boosts

Views

Activity

Reply to Why does Combine assign crash when writing to an optional property?
I believe it is because you are using an implicitly unwrapped optional value with Int!, which means that you are guaranteeing it will have a value before value is accessed. To prevent the crash you should just assign an initial value to it. var value: Int! = 0 That may or may not work for your situation.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’23