I have one UIViewController and inside it I have 3 UIWebView . I added programmatically. Right now I can swipe, but only 3 pages, and then repeat. I want to enlarge my current page and add it to my webView3, but I do not know how to do this.
Could you give me some advice? I really have a problem in this part!
Here is my code:
- (void)viewDidLoad { [super viewDidLoad]; NSLog(@"test view"); NSURL *url = [NSURL fileURLWithPath:[ [ NSBundle mainBundle ] pathForResource: @"Name/Name1" ofType:@"html" ]]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; [webView2 loadRequest:request]; [webView2 bringToFront]; NSURL *url = [NSURL fileURLWithPath:[ [ NSBundle mainBundle ] pathForResource: @"Name/Name2" ofType:@"html" ]]; NSURLRequest *request = [NSURLRequest requestWithURL:url]; [webView3 loadRequest:request]; UISwipeGestureRecognizer *swipeLeft = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeLeftAction:)]; swipeLeft.direction = UISwipeGestureRecognizerDirectionLeft; swipeLeft.delegate = self; [self.view addGestureRecognizer:swipeLeft]; } - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer { return YES; }
currentPage is an integer and at the beginning it is 0. My question is, how should I add my current page to webView3 so that when I skip it will enlarge my pages?
- (void)swipeLeftAction:(id)ignored { NSLog(@"Swipe Left"); UIWebView *temp = webView2 ; webView2 = webView3; webView3 = webView; webView = temp; [webView2 bringToFront]; currentPage++; }
Thanks in advance!
**** Edit: **
This current page is not associated with any webView, how can I get this increase in my web browser? **
jason
source share