As per JoePasq's answer, I would use KVO for this and register observers for whichever key/value pairs you'd like to mimic in each UIScrollView
. It would look something like this (untested):
// Do this during initialisation of scrollView2
[scrollView1 addObserver:self
forKeyPath:@"contentOffset"
options:NSKeyValueObservingOptionNew
context:NULL];
[scrollView1 addObserver:self
forKeyPath:@"zoomScale"
options:NSKeyValueObservingOptionNew
context:NULL];
// Implement this method on scrollView2
- (void)observeValueForKeyPath:(NSString *)keyPath
ofObject:(id)object
change:(NSDictionary *)change
context:(void *)context {
[self setValue:[change valueForKey:NSKeyValueChangeNewKey] forKey:keyPath];
}