Przykłady Container View Controller [zamknięty]
Czy ktoś może wskazać mi jakieś dobre przykłady tworzenia niestandardowego kontrolera widoku jako kontrolera widoku kontenera? Jedyną dokumentacją, którą mogę znaleźć, jest kilka akapitów w UIViewController Class Reference . Czuję, że potrzebuję trochę więcej informacji niż to i przykładowe wdrożenie byłoby miłe. Google nic nie znalazło.
Jestem szczególnie zainteresowany metodą:
transitionFromViewController:toViewController:duration:options:animations:completion:
7 answers
Najlepszą rzeczą jaką do tej pory znalazłem jest wideo sesji WWDC 2011 sesja 102 - Implementing UIViewController Containment.
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2013-02-18 15:40:02
Oprócz wideo sesji WWDC sesja 102 - Implementing UIViewController Containment że hypercrypt już wspomniano, Apple WWDC 2012 sesja na "Ewolucja kontrolerów widoku na iOS" obejmuje również ten temat, a przykładowy kod jest częścią przykładowego pakietu kodu:
Jest też przykład proszę.: 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/doraprojects.net/template/agent.layouts/content.php on line 54
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];
}
Ta akcja wyzwala przejście między dwoma VC:
-(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/doraprojects.net/template/agent.layouts/content.php on line 54
2014-10-10 10:01:22
Znalazłem ten przykład bardzo przydatny dla mnie
Http://sandmoose.com/post/35714028270/storyboards-with-custom-container-view-controllers
I mają źródło na GitHubie:
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2014-04-10 10:28:52
Czy to:
Http://subjective-objective-c.blogspot.com/2011/08/writing-high-quality-view-controller.html
Wystarczy na twoje potrzeby?
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2011-10-13 14:56:41
Nie wiem, czy jest to" dobry " przykład, ale możesz pobrać darmowy Container ViewController z https://bitbucket.org/javieralonso/jaacordeonviewcontroller/overview
To pełny kontroler widoku kontenera akordeonu
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2011-11-17 15:42:01
Oto Mój ulubiony (gotowy do iOS7) tutorial / przykłady na ten temat (wszystkie trzy mają kod źródłowy dostępny na GitHubie):
Niestandardowe Przejścia Kontrolera Widoku Kontenera
Interactive Custom Container View Controller Transitions
No i oczywiście Apple oferuje cały wpis na ten temat, który uważam za nieoceniony:
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2014-09-24 11:32:40