Andrew
Andrew

Reputation: 16051

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 it to support video, so i'm making it myself.

Upvotes: 0

Views: 125

Answers (1)

Rakesh Bhatt
Rakesh Bhatt

Reputation: 4606

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){


    }
}

Upvotes: 2

Related Questions