iphone - Programatically Control UIScrollView -
is there method of programatically controlling uiscrollview? in, getting value location, how far along scrolled , things , change position, scroll programatically?
hope can help, thanks.
i don't know either of @alexandergre or @jagostoni talking about. scrolling in uiscrollview easy.
i suggest take @ documentation uiscrollview: http://developer.apple.com/library/ios/#documentation/uikit/reference/uiscrollview_class/reference/uiscrollview.html
to scroll uiscrollview, use
- (void)scrollrecttovisible:(cgrect)rect animated:(bool)animated
example:
[myscrollview scrollrecttovisible:cgrectmake(20, 20, 320, 480) animated:yes];
that scroll uiscrollview animation 20 on x axis, 20 on y , 320x480 height , width.
if want information of view self(for example frame visible) should use methods , properties uiview, it's uiscrollview's parent. check out uiview documentation at: http://developer.apple.com/library/ios/#documentation/uikit/reference/uiview_class/uiview/uiview.html
to frame visible, use
myscrollview.frame;
do not mix content size
myscrollview.contentsize;
but, said. use documentation!
Comments
Post a Comment