Comments (5)
Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.
from kvocontroller.
Thank you for your patience. We're going to close out this issue. If you're still experiencing the problem described, please reopen the issue - thanks!
from kvocontroller.
I can confirm that I am still experiencing this problem when using 1.0.3. Can we reopen this issue?
from kvocontroller.
Hi @siyusong, even the native KVO system will call the block simultaneously before the registration of KVO if you specify option NSKeyValueObservingOptionInitial. At that time, the registration is not completed.
So I think it's not a bug of FBKVOController, you can just remove the Initial option as it's a limitation of KVO.
from kvocontroller.
Hi @wizzardchao,
Thanks for the explanation. I checked Apple's documentation of NSKeyValueObservingOptionInitial, and it indeed mentioned the fact that observer registration may not be completed in that case:
- NSKeyValueObservingOptionInitial
If specified, a notification should be sent to the observer immediately, before the observer registration method even returns.
However, I disagree with you that this is not a bug of KVOController. The OP of this issue and I are using - unobserve:
in KVOController, not - removeObserver:forKeyPath:
method in Foundation. The discussion section of - unobserve:
clearly mentions that, if the object is not observed, "this method results in no operation".
Therefore, I think it's reasonable for me to expect that - unobserve:
method (and its siblings) would never result in an error.
from kvocontroller.
Related Issues (20)
- Version 1.1.0 requires Xcode 7.?+ HOT 1
- Replace usage of OSSpinLock with pthread_mutex
- Include prebuilt framework in releases HOT 3
- compile error with cocoapods 1.0.1 HOT 1
- what should i do if I'd like to use like this without retain cycle HOT 3
- Accidental use of the NSObject+FBKVOController.h in Swift? HOT 4
- retain cycle! HOT 4
- KVOController retain ViewController not call Deinit class HOT 1
- NSKeyValueChangeKey should need iOS10 or later?? HOT 4
- method:"- (void)observe:(nullable id)object keyPath:(NSString *)keyPath options:(NSKeyValueObservingOptions)options action:(SEL)action" assert selector in swift issue HOT 1
- O
- is KVOController support listen to self keyPath ?
- Why dynamic in swift? HOT 1
- is there any scenario for using `KVOControllerNonRetaining`? HOT 3
- FBKVOController/FBKVOController.h' file not found
- When textField is edited HOT 1
- self.KVOControllerNonRetaining observe:self crash HOT 4
- Add the code below and it works fine:
- What is the difference between this and ordinary KVO HOT 1
- Automatic removal of observation for not retained observed objects. HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kvocontroller.