|
note: same as video but giving error in observevalue func inside if statement("Instance member 'webview' cannot be used on type viewcontroller") |
|
just remove keyword |
|
@ygeras thank you! Why did the code completion insert "class" here if it wasn't needed? |
|
Hi @vercordio! Good question! I am not an expert to answer that kind of question but digging into the code I noticed that when you start typing observeValue, Xcode code completion says there are actually two similar methods. So if you choose the first option it fills in the code with Key-value observing is a Cocoa programming pattern you use to notify objects about changes to properties of other objects. It's useful for communicating changes between logically separated parts of your app—such as between models and views. You can only use key-value observing with classes that inherit from NSObject. So can deduce from that, that method |
|
|
|
SPONSORED Take the pain out of configuring and testing your paywalls. RevenueCat's Paywalls allow you to remotely configure your entire paywall view without any code changes or app updates.
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.