I'm thinking you're going to need to set a UIScrollView delegate that tracks touches beginning and ending. More specifically, scrollViewDidEndDragging:willDecelerate is what I'm thinking you'll need to use, as it fires the instant a user lifts their hand from the device.
Up vote 0 down vote favorite share g+ share fb share tw.
Ok. Here is the story: I have a UIWebView in full screen, width = 768 It loads several images and those images are in one line, which means the UIWebView will scroll only horizontally. Now, I set the UIScrollView inside the UIWebView to pagingEnabled = YES.
So the scroll on the UIWebView will move page by page. The problem is that every image's width is about 900. I won't scale them down and if I scroll the UIWebView, from the 2nd page on, always 132points of previous image will show.
This is not good for me. So how can I manipulate the UIWebView or the UIScrollView inside the UIWebView so that each scroll will move a page of 900 points, if the view's frame width is 768? The constraints are: I can't change its contentSize I can't change its bounds or frame I say these constraints because UIWebView will change them on its own purpose when it loads contents.
Anyone would like to join this brain storming? Thanks ipad uiwebview uiscrollview paging link|improve this question edited Sep 8 '11 at 16:03 asked Sep 8 '11 at 15:51Jackson Tale8218 89% accept rate.
I'm thinking you're going to need to set a UIScrollView delegate that tracks touches beginning and ending. More specifically, scrollViewDidEndDragging:willDecelerate is what I'm thinking you'll need to use, as it fires the instant a user lifts their hand from the device. First, pagingEnabled=NO seems obvious, we're going to have to control our own paging.
Which, I don't feel is too tough. Track the direction of the scrolling in scrollViewDidScroll:, so that we have some global set: BOOL isGoingRight = YES or NO (NO means the last movement was to the left) float PAGESIZE = 900.0; Here's how my scrollview delegate method would look like that handles paging. - (void) scrollViewDidEndDragging:(UIScrollView*)_scrollView willDecelerate:(BOOL)willDecelerate { float offsetProportion = _scrollView.contentOffset.
X/_scrollView.frame.size. Width; //depending upon our direction, round up or down int page = isGoingRight? Ceilf(offsetProportion): floorf(offsetProportion); //manually finish the scroll _scrollView scrollRectToVisible:CGRectMake(page*PAGESIZE, 0, _scrollView.frame.size.
Width, _scrollView.frame.size. Height) animated:YES; } I didn't test this, you may or may not need to disable touches at points.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.