开发者

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

开发者 https://www.devze.com 2023-03-20 11:34 出处:网络
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 weird

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

精彩评论

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

关注公众号