UIPageViewController: Unterschied zwischen den Versionen

Aus Byte-Welt Wiki
Zur Navigation springenZur Suche springen
K
 
Zeile 1: Zeile 1:
 
==Hinzufügen von Seiten==
 
==Hinzufügen von Seiten==
<code=objc>
+
<syntaxhighlight lang="objc">
 
UIViewController* newController = [UIViewController new];
 
UIViewController* newController = [UIViewController new];
 
[pageviewcontroller setViewControllers:[NSArray arrayWithObject:newController] direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:nil];
 
[pageviewcontroller setViewControllers:[NSArray arrayWithObject:newController] direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:nil];
</code=objc>
+
</syntaxhighlight>
 
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.
  
 
==Löschen von Seiten==
 
==Löschen von Seiten==
<code=objc>
+
<syntaxhighlight lang="objc">
 
[pageviewcontroller setViewControllers:[NSArray arrayWithObject:controllerToShow] direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:nil];
 
[pageviewcontroller setViewControllers:[NSArray arrayWithObject:controllerToShow] direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:nil];
</code=objc>
+
</syntaxhighlight>
 
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.
  

Aktuelle Version vom 9. Januar 2021, 13:06 Uhr

Hinzufügen von Seiten

UIViewController* newController = [UIViewController new];
[pageviewcontroller setViewControllers:[NSArray arrayWithObject:newController] direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:nil];

Es muss animated:NO gesetzt werden, sonst funktioniert es auf Grund eines Bugs nicht.

Löschen von Seiten

[pageviewcontroller setViewControllers:[NSArray arrayWithObject:controllerToShow] direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:nil];

Es muss animated:NO gesetzt werden, sonst funktioniert es auf Grund eines Bugs nicht.