UIPageViewController: Unterschied zwischen den Versionen

Aus Byte-Welt Wiki
Die Seite wurde neu angelegt: „==Hinzufügen von Seiten== <code=objectivec> UIViewController* newController = [UIViewController new]; [pageviewcontroller setViewControllers:[NSArray arrayWithOb…“
 
Keine Bearbeitungszusammenfassung
Zeile 1: Zeile 1:
==Hinzufügen von Seiten==
==Hinzufügen von Seiten==
<code=objectivec>
<code=objc>
UIViewController* newController = [UIViewController new];
UIViewController* newController = [UIViewController new];
[pageviewcontroller setViewControllers:[NSArray arrayWithObject:newController] direction:UIPageViewControllerNavigationDirectionForward animated:YES completion:nil];
[pageviewcontroller setViewControllers:[NSArray arrayWithObject:newController] direction:UIPageViewControllerNavigationDirectionForward animated:YES completion:nil];
</code=objectivec>
</code=objc>


==Löschen von Seiten==
==Löschen von Seiten==
<code=objectivec>
<code=objc>
[pageviewcontroller setViewControllers:[NSArray arrayWithObject:controllerToShow] direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:nil];
[pageviewcontroller setViewControllers:[NSArray arrayWithObject:controllerToShow] direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:nil];
</code=objectivec>
</code=objc>
Es '''muss''' ''animated:NO'' gesetzt werden, sonst funktioniert es auf Grund eines Bugs nicht.
Es '''muss''' ''animated:NO'' gesetzt werden, sonst funktioniert es auf Grund eines Bugs nicht.



Version vom 20. Juli 2014, 20:22 Uhr

Hinzufügen von Seiten

<code=objc> UIViewController* newController = [UIViewController new]; [pageviewcontroller setViewControllers:[NSArray arrayWithObject:newController] direction:UIPageViewControllerNavigationDirectionForward animated:YES completion:nil]; </code=objc>

Löschen von Seiten

<code=objc> [pageviewcontroller setViewControllers:[NSArray arrayWithObject:controllerToShow] direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:nil]; </code=objc> Es muss animated:NO gesetzt werden, sonst funktioniert es auf Grund eines Bugs nicht.