I have a custom UIViewone that is added as subViewfor UIScrollView, and I want it to UIViewautomatically move whenever it scrolls UIScrollView. Besides observing a property UIScrollView's contentOffset(which works great), I also need to observe its property dragging:
[scrollView addObserver:self
forKeyPath:@"dragging"
options:NSKeyValueObservingOptionNew
context:NULL];
but in the method observeValueForKeyPath:ofObject:change:contextI did not receive any NSNotificationproperty changes dragging, what is the problem here? Thank.
updated
Since I am going to reuse this custom one UIViewin several UIViewControllers, I want the user view to handle the repositioning logic itself, rather than duplicating the repositioning logic in each method UIViewController's UIScrollViewDelegate(for example, a scrollViewDidScrollthing).
source
share