UIPageViewController

Aus Byte-Welt Wiki
Zur Navigation springenZur Suche springen

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.