What's new
Apple iPad Forum 🍎

Welcome to the Apple iPad Forum, your one stop source for all things iPad. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

ipad application problem in gesture recognization and uiview swap effect

Priyankadmehta

iPF Noob
Joined
Mar 5, 2012
Messages
7
Reaction score
0
Location
Ahmedabad
i tried following code for giving gesture recognizer with swipe effect
- (void)viewDidLoad
{
[self.view addGestureRecognizer:swipeRecognizer];*/
UISwipeGestureRecognizer* rightSwipeGestureRecognizer = [[[UISwipeGestureRecognizer alloc] initWithTarget:self action:mad:selector(swipeRight:)] autorelease];

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


UISwipeGestureRecognizer* leftSwipeGestureRecognizer = [[[UISwipeGestureRecognizer alloc] initWithTarget:self action:mad: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:mad:"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];


}
 
OP
P

Priyankadmehta

iPF Noob
Joined
Mar 5, 2012
Messages
7
Reaction score
0
Location
Ahmedabad
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...........
 
OP
P

Priyankadmehta

iPF Noob
Joined
Mar 5, 2012
Messages
7
Reaction score
0
Location
Ahmedabad
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
 

Mickey330

Administrator
Staff member
Joined
Aug 30, 2010
Messages
11,892
Reaction score
2,225
Location
Western NY state (USA)
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

Top