开发者

Attempting to create a UIScrollView inside of a UIScrollView, like photos app

I'm having difficulty though. As soon as i make the content size of the outer scrollview be bigger than it's frame, the image that i'm zooming on it's subview (also a scrollview) is behaving weirdly.

Anybody have any ideas on how to do this? I'm making my own because i have problems with various ones on the internet and i also want开发者_如何学Go it to support video, so i'm making it myself.


FOR ZOOMING inner scrollview you have to right this method.

    - (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView{
        if(scrollView!=Innerscr){
             UIImageView *v=(UIImageView*)[scrollView viewWithTag:kTagImageViewInScrollView];
             return v;
        } else {
             return nil;
        }
   }

and for scrolling images you have to write code in under method

-(void)scrollViewDidScroll:(UIScrollView *)scrollView{

    if(scrollView==Outerscr){


    }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜