is it allowed to override the setContentOffset method of an UIScrollView while subclassing?? Is this AppStore save?
sample:
-(void)setContentOffset:(CGPoint)contentOffset {
[super setContentOffset:contentOffset];
NSLog(@"co: %@",NSStringFromCGPoint(contentOffset));
if(_willScroll)
[_svDelegate setContentOffset:CGPointMake(contentOffset.x, contentOffset.y *2)];
}
thanks,
Omid
Yes. Lots of iPhone programmers subclass
UIScrollViewand then replace or extend functionality of public API’s likesetContentOffset.The only correction I would make for you is to use the correct API. It’s not:
setContentOffset:but instead it’s
setContentOffset: animated:(i.e. with an
animatedparameter — Apple’s documentation is linked for you there).