Join GitHub today
[iOS] Fixes KVO native binding #403
Description of Change
Keep our native property listener around the same time we keep our proxy, check if we are KVO compliant before adding observer
This fixes a crash when using NativeBinding 2-way without using a event. The KVO implementation wasn't ok, first we need to keep the observer around, nativePropertyListener, and we also need to make sure the a key for our property exists, normally it's a lowercase of XIOS public property. The only way was to catch the exception that the key wasn't found.
Also added a example of how one can make a KVO compliant control to use 2 way binding in iOS without specifying the event.