Note that there are some explanatory texts on larger screens.

plurals
  1. POSwipe Gesture Not Working
    primarykey
    data
    text
    <p>i wanted to swipe my image view but not swapped to left side. i get image from frontcard array. and i wanted to display in imageview and swipe verticlally.</p> <p>I tried this one</p> <pre><code>FrontsCards =[[NSMutableArray alloc]initWithCapacity:9]; [FrontsCards insertObject:@"cloub1.png" atIndex:0]; [FrontsCards insertObject:@"cloub2.png" atIndex:1]; [FrontsCards insertObject:@"cloub3.png" atIndex:2]; [FrontsCards insertObject:@"cloub4.png" atIndex:3]; [FrontsCards insertObject:@"cloub5.png" atIndex:4]; [FrontsCards insertObject:@"cloub6.png" atIndex:5]; [FrontsCards insertObject:@"cloub7.png" atIndex:6]; [FrontsCards insertObject:@"cloub8.png" atIndex:7]; [FrontsCards insertObject:@"cloub9.png" atIndex:8]; - (void)viewDidLoad { [super viewDidLoad]; UISwipeGestureRecognizer *leftRecognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(leftSwipeHandle:)]; leftRecognizer.direction = UISwipeGestureRecognizerDirectionLeft; [leftRecognizer setNumberOfTouchesRequired:1]; [ImgView addGestureRecognizer:leftRecognizer]; } - (void)leftSwipeHandle:(UISwipeGestureRecognizer*)gestureRecognizer int m = 0; NSLog(@"Left Swipe"); AppDelegate * delegate=(AppDelegate *)[[UIApplication sharedApplication]delegate]; NSLog(@"%d",m); for(m=0; m&lt;[delegate.FrontsCards count];m++) { int randIdx=arc4random()%[delegate.FrontsCards count]; // Randomly shufffled ImgView.userInteractionEnabled=YES; ImgView.image=[UIImage imageNamed:[delegate.FrontsCards objectAtIndex:randIdx]]; NSLog(@"%d",m); } } </code></pre> <p>images not swapped to imageview. how to solve my problem help me out this. thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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