Fazendo um link para um outro ViewController-Cocoa Touch TutorialPosted by: Matheus on 14th September 2009Agora explico um método de fazer um link para um segundo ViewController extremamente simples e útil com apenas uma linha de código, inclui também uma animação durante a transição, que ensino como customiza-la.
Agora explico um método de fazer um link para um segundo ViewController extremamente simples e útil com apenas uma linha de código, inclui também uma animação durante a transição, que ensino como customiza-la.
Classes: “PrimeiraView.h” #import “SegundaView.h” @interface DuasViewsViewController : UIViewController { IBOutlet SegundaView *cSegunda;
} -(IBAction)ir; @end
“PrimeiraView.m” -(IBAction)ir { cSegunda.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; [self presentModalViewController:cSegunda animated:YES]; }
- (void)dealloc { [super dealloc]; }
@end
“SegundaView.h” @interface SegundaView : UIViewController {
} -(IBAction)voltar; @end
“SegundaView.m” @implementation SegundaView -(IBAction)voltar { [self dismissModalViewControllerAnimated:YES]; } - (void)dealloc { [super dealloc]; }
@end
|
ClickakiBuscaParceirosCategorias
Twitter Updates |
Leave a reply