alexiscreuzot / KASlideShow

Ultra-basic slideshow for iOS (ARC only).
MIT License
206 stars 61 forks source link

KASlideShow with storyboard #11

Closed ghost closed 9 years ago

ghost commented 10 years ago

Demo project which u did is build on *.xib files. I need to use it with storyboard but when I run my application, all I have is black screen without pictures. Could you help me and write how to build project with your library + storyboard?

docash59 commented 10 years ago

In .h

@property (strong,nonatomic) IBOutlet KASlideShow * slideshow;

In .m

_slideshow.delegate = self;
    [_slideshow setDelay:2.5]; // Delay between transitions
    [_slideshow setTransitionDuration:.7]; // Transition duration
    [_slideshow setTransitionType:KASlideShowTransitionFade]; // Choose a transition type (fade or slide)
    [_slideshow setImagesContentMode:UIViewContentModeScaleAspectFill]; // Choose a content mode for images to display
    [_slideshow addImagesFromResources:@[@"IMAGE1.png", @"IMAGE2.png"]];

In Storyboard

  1. Place a UIView
  2. Set the CustomClass to:
KASlideShow
  1. In the View Controller click and drag the link to the UIView
  2. Done