What's new

ipad application problem in gesture recognization and uiview swap effect

i tried following code for giving gesture recognizer with swipe effect
- (void)viewDidLoad
{
[self.view addGestureRecognizer:swipeRecognizer];*/
UISwipeGestureRecognizer* rightSwipeGestureRecognizer = [[[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeRight:)] autorelease];

rightSwipeGestureRecognizer.direction = UISwipeGestureRecognizerDirectionRight;
[self.view addGestureRecognizer:rightSwipeGestureRecognizer];


UISwipeGestureRecognizer* leftSwipeGestureRecognizer = [[[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(swipeLeft:)] autorelease];

leftSwipeGestureRecognizer.direction = UISwipeGestureRecognizerDirectionLeft;
[self.view addGestureRecognizer:leftSwipeGestureRecognizer];
}
-(IBAction)swipeRight:(UIGestureRecognizer *)sender{
[self PlayClickSound];
[self removeViews];
videoView *videoview1 = [[videoView alloc]
initWithNibName:nil bundle:nil];
// videoview1.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
videoview1.contentViewLangId=contentViewLangId;
videoview1.topicId=topicId;
NSLog(@"Video : %@",topicId);
[self presentModalViewController:videoview1 animated:YES];
CATransition *animation = [CATransition animation];
[animation setDelegate:self];
// [animation setType:@"oglFlip"];
[animation setType:kCAValueFunctionScale];
//[animation setSubtype:direction];
[animation setDuration:1.0];
[animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]];
//return animation;

}
-(IBAction)swipeLeft:(UIGestureRecognizer *)sender{
[self PlayClickSound];
[self removeViews];
linkView *linkview1 = [[linkView alloc]
initWithNibName:nil bundle:nil];
//linkview1.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
linkview1.contentViewLangId=contentViewLangId;
linkview1.topicId=topicId;
NSLog(@"Quiz : %@",topicId);
CATransition *transition = [CATransition animation];
// [transition.durat];
transition.duration = 0.75;

transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear];
transition.type = kCATransitionFromLeft;
transition.subtype = kCATransitionFromLeft;
transitioning = YES;


transition.delegate = self;


[self presentModalViewController:linkview1 animated:transitioning];


}
 
swipe effect for different view

i want to swipe different viewcontroller class from left to right which has different xib i tried using storyboard and scrollview,pageview controller but it does not work properlly...........
 
swipe effct for viewcontrollers in ipad application

i use scrollview in my project for swap and scroll different viewcontroller in scrollview i added four different pages in my first view controller i display one text file and one video file in second view controller video will play and in third view controller i m display text file and in fourth quiz will display but when i scroll pages video will play in background and all pages loaded at a time in scrollview
 
Hi. Unfortunately, I don't understand what you are trying to do. Hopefully, someone will be along to help soon...

I am posting to ask that you please keep any discussion on this issue to one thread (you had made several other posts about this topic). I have merged them all into this post here. Please keep all updates, discussion and further updates about this issue to this thread.

Having several posts scattered about fragments the conversation and makes it difficult to follow. Not to mention - its also against the rules. So, please, stick to this thread. Thanks for your understanding.

Marilyn
Moderator, iPadForums.net
 

Most reactions

Latest posts

Back
Top