ipod touch and 2 UIViews
ipod touch and 2 UIViews
- Subject: ipod touch and 2 UIViews
- From: Carlo Gulliani <email@hidden>
- Date: Mon, 16 Mar 2009 13:07:15 -0700 (PDT)
i have 3 classes: SwitchController and 2 classes for each XIB.
i wanna change view with help 'mapCurl' effect, my SwitchController.m has the next code:
- (void)viewDidLoad {
SecondViewController*secondController = [[SecondViewControlleralloc] initWithNibName:@"SecondView"bundle:nil];
self.secondViewController.view.userInteractionEnabled = YES;
self.secondViewController = secondController;
[self.view insertSubview:self.secondViewController.view atIndex:0];
[secondController release];
FirstViewController*firstController = [[FirstViewControlleralloc] initWithNibName:@"FirstView"bundle:nil];
self.firstViewController.view.userInteractionEnabled = YES;
self.firstViewController = firstController;
[secondController.view addSubview:self.firstViewController.view];
firstController.view.tag = TOP_LAYER_VIEW;
[firstController release];
notCurled= YES;
}
- (IBAction) switchViews:(id) sender
{
// Curl the image up or down
CATransition*animation = [CATransitionanimation];
[animation setDelegate:self];
[animation setDuration:1.0f];
[animation setTimingFunction:UIViewAnimationCurveEaseInOut];
[animation setType:(notCurled ? @"mapCurl" : @"mapUnCurl")];
[animation setRemovedOnCompletion:NO];
[animation setFillMode: @"extended"];
[animation setRemovedOnCompletion: NO];
[[[self.secondViewController.view viewWithTag:TOP_LAYER_VIEW] layer] addAnimation:animation forKey:@"pageFlipAnimation"];
notCurled= !notCurled;
}
it works great, but under view has a button, but my button doesn't get events. for example, i'm trying to press, but it doesn't work for me. It simple Rect button, usually, when i'm pressed the same button, she's change color on blue, but not now
how to be? i've been trying a lot of but have not found solution
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden