Ejemplos de Controlador de Vista de Contenedor [cerrado]
¿Puede alguien señalarme algún buen ejemplo de cómo crear un Controlador de Vista Personalizado como un Controlador de Vista de Contenedor? La única documentación que puedo encontrar es un par de párrafos en la Referencia de la clase UIViewController. Siento que necesito un poco más de información y un ejemplo de implementación sería bueno. Google no ha encontrado nada en absoluto.
Estoy específicamente interesado en el método:
transitionFromViewController:toViewController:duration:options:animations:completion:
7 answers
Lo mejor que he encontrado hasta ahora es la sesión WWDC 2011 Video Sesión 102 - Implementando la contención de UIViewController.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-02-18 15:40:02
Además de la Sesión WWDC Video Sesión 102-Implementando la contención de UIViewController que hypercrypt ya mencionó, La sesión Apple WWDC 2012 sobre "La Evolución de los Controladores de vista en iOS" también cubre este tema y el código de ejemplo es parte del paquete de código de muestra:
También Hay un ejemplo aqui: https://github.com/toolmanGitHub/stackedViewControllers
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-07-22 15:57:07
- (void)viewDidLoad{
[super viewDidLoad];
// I put self in a Navigation VC so we can use its right navigationbar
// item for triggering the transition
self.navigationItem.rightBarButtonItem =
[[[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemEdit
target:self
action:@selector(button:)]
autorelease];
// create test1 and test2 instance (subclass UIViewController and
// also need to define their own nibs)
vc1 = [[test1 alloc]initWithNibName:@"test1" bundle:nil];
vc2 = [[test2 alloc]initWithNibName:@"test2" bundle:nil];
//add to the container vc which is self
[self addChildViewController:vc1];
[self addChildViewController:vc2];
//the entry view (will be removed from it superview later by the api)
[self.view addSubview:vc1.view];
}
Esta IBAction activa la transición entre dos VCs:
-(IBAction)button:(id)sender {
[self transitionFromViewController:vc1
toViewController:vc2
duration:0.5
options:UIViewAnimationOptionTransitionCurlDown
animations:nil
completion:nil];
}
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-10-10 10:01:22
Encontré este ejemplo muy útil para mí
Http://sandmoose.com/post/35714028270/storyboards-with-custom-container-view-controllers
Y tienen fuente en github:
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-04-10 10:28:52
Podría esto:
Http://subjective-objective-c.blogspot.com/2011/08/writing-high-quality-view-controller.html
Ser suficiente para sus necesidades?
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2011-10-13 14:56:41
No sé si este es un ejemplo "bueno" , pero puede obtener un contenedor gratuito ViewController desde https://bitbucket.org/javieralonso/jaacordeonviewcontroller/overview
Es un controlador de vista de contenedor de metáfora de acordeón completo
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2011-11-17 15:42:01
Estos son mis tutoriales / ejemplos favoritos (listos para iOS7) sobre el tema (los tres tienen código fuente disponible en github):
Contención del controlador de vista
Transiciones de Controlador de Vista de Contenedor personalizado
Transiciones de Controlador de Vista de Contenedor Personalizado Interactivo
Y luego, por supuesto, Apple ofrece un artículo completo sobre el tema que encuentro invaluable:
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2014-09-24 11:32:40