Note that there are some explanatory texts on larger screens.

plurals
  1. POuiscrollview rest when touch
    text
    copied!<p>i have UIScrollView it has next button when click it run this code</p> <pre><code>-(IBAction)ScrollPage:(id)sender { NSLog(@"ScrollPage Called"); NSInteger positionX; if ([sender tag] == 1) { positionX = AddNewScroll.contentOffset.x - 320; }else { positionX = AddNewScroll.contentOffset.x + 320; } [AddNewScroll setContentOffset:CGPointMake(positionX,0) animated:YES]; } </code></pre> <p>and it will move the scroll to new page , then i have button there when click it will call </p> <pre><code>-(IBAction)SelectImg:(id)sender { UIActionSheet *imgMenu = [[UIActionSheet alloc] initWithTitle:@"choose image" delegate:self cancelButtonTitle:@"Cancel" destructiveButtonTitle:@"Camera" otherButtonTitles:@"Album",nil]; imgMenu.actionSheetStyle = UIActionSheetStyleBlackTranslucent; [imgMenu showInView:[UIApplication sharedApplication].keyWindow]; } - (void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex { imgPicker = [[UIImagePickerController alloc] init]; imgPicker.allowsEditing = YES; imgPicker.delegate = self; @try { if (buttonIndex == 0) { imgPicker.sourceType = UIImagePickerControllerSourceTypeCamera; [self presentModalViewController:imgPicker animated:YES]; } if (buttonIndex == 1) { imgPicker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; //Start iPhone PhotoLibrary if ([[UIDevice currentDevice]userInterfaceIdiom] == UIUserInterfaceIdiomPhone){ [self presentModalViewController:imgPicker animated:YES]; } else //Start iPad PhotoLibrary if ([[UIDevice currentDevice]userInterfaceIdiom] == UIUserInterfaceIdiomPad){ aPopover = [[UIPopoverController alloc] initWithContentViewController:imgPicker]; [aPopover presentPopoverFromRect:CGRectMake(250, 40, 300, 300) inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; } } } </code></pre> <p>the Problem is when it call the actionSheet the UIScrollView by itself go to first page contentOffset to 0 then call scrollViewDidScroll</p> <p>ps. Paging Disable</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload