I am trying to use the IKImageViewDemo provided by apple ( http://developer.apple.com/mac/library/samplecode/IKImageViewDemo/index.html ) and I am trying to add scrolls to it. I tried two things:
1) embedding IKImageView in ScrollView. It had all kinds of weird effects, for example, the image was no longer where it should have been, and the scroll bars seemed to be in a fixed place, no matter how big the window was (so I could squeeze the window and lose the scroll bars although scrollview was configured to resize the window)
2) I added [_imageView setHasHorizontalScrollers: YES] (and vertically) to the code in the openImageURL method. It didn't seem to do anything.
Am I missing something obvious?
Extras: Why
NSLog(@"scrollbar? H %d V %d hide %d",
_imageView.hasHorizontalScroller,
_imageView.hasVerticalScroller,
_imageView.autohidesScrollers);
_imageView.hasHorizontalScroller = YES;
_imageView.hasVerticalScroller = YES;
_imageView.autohidesScrollers = YES;
NSLog(@"scrollbar? H %d V %d hide %d",
_imageView.hasHorizontalScroller,
_imageView.hasVerticalScroller,
_imageView.autohidesScrollers);
give me:
scrollbar? H 0 V 0 hide 0
scrollbar? H 0 V 0 hide 0
?
:
, :
BOOL b = _imageView.autohidesScrollers = YES;
NSLog (@"b %d scrollers %d", b, _imageView.autohidesScrollers);
print b 1 0?