Guest User

Untitled

a guest
Apr 20th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. // Initialize scene and slide show layer.
  2. Scene * s = [Scene node];
  3. SlideShowLayer * ssl = [SlideShowLayer node];
  4.  
  5. // Set positions for the background and labels.
  6. // Generally you'll be using full screen backgrounds
  7. // (screenshots), and positioning them at the center.
  8. [ssl setBackgroundXPosition:100];
  9. [ssl setBackgroundYPosition:100];
  10. [ssl setDescriptionXPosition: 200];
  11. [ssl setDescriptionYPosition: 200];
  12. [ssl setDescriptionWidth:100];
  13. [ssl setDescriptionHeight:300];
  14. [ssl setFontName:@"Helvetica"]; // optional
  15. [ssl setFontSize:24]; // optional
  16.  
  17. // Add slides in order they appear.
  18. [ssl addSlideWithBackground:@"pic1.png" andDescription:@"Yada yada one."];
  19. [ssl addSlideWithBackground:@"pic2.png" andDescription:@"Yada yada two."];
  20. [ssl addSlideWithBackground:@"pic3.png" andDescription:@"Yada yada 3."];
  21. [ssl addSlideWithBackground:@"pic4.png" andDescription:@"Yada yada 4."];
  22. [ssl addSlideWithBackground:@"pic5.png" andDescription:@"Yada yada 5."];
  23. [ssl addSlideWithBackground:@"pic6.png" andDescription:@"Yada yada six."];
  24.  
  25. // Start and display the slide show.
  26. [ssl displayFirstSlide];
  27. [scene add:ssl];
  28. [[Director sharedDirector] pushScene:scene];
Add Comment
Please, Sign In to add comment