Skip to content

Commit

Permalink
Add files for cocoa pods
Browse files Browse the repository at this point in the history
  • Loading branch information
Tibolte committed Sep 8, 2014
1 parent 9149404 commit 9cad714
Show file tree
Hide file tree
Showing 6 changed files with 780 additions and 0 deletions.
61 changes: 61 additions & 0 deletions Classes/KIImagePager.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
//
// KIImagePager.h
// KIImagePager
//
// Created by Marcus Kida on 07.04.13.
// Copyright (c) 2013 Marcus Kida. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>

@class KIImagePager;

@protocol KIImagePagerDataSource <NSObject>

@required
- (NSArray *) arrayWithImages;
- (UIViewContentMode) contentModeForImage:(NSUInteger)image;

@optional
- (UIImage *) placeHolderImageForImagePager;
- (NSString *) captionForImageAtIndex:(NSUInteger)index;

@end

@protocol KIImagePagerDelegate <NSObject>

@optional
- (void) imagePager:(KIImagePager *)imagePager didScrollToIndex:(NSUInteger)index;
- (void) imagePager:(KIImagePager *)imagePager didSelectImageAtIndex:(NSUInteger)index;

@end

@interface KIImagePager : UIView

// Delegate and Datasource
@property (weak) IBOutlet id <KIImagePagerDataSource> dataSource;
@property (weak) IBOutlet id <KIImagePagerDelegate> delegate;

// General
@property (assign) UIViewContentMode contentMode;
@property (nonatomic, retain) UIPageControl *pageControl;
@property (nonatomic, assign) NSUInteger currentPage;
@property (nonatomic, assign) BOOL indicatorDisabled;
@property (nonatomic, assign) BOOL hidePageControlForSinglePages; // Defaults YES

// Slideshow
@property (assign) NSUInteger slideshowTimeInterval; // Defaults 0.0f (off)
@property (assign) BOOL slideshowShouldCallScrollToDelegate; // Defaults YES

// Caption Label
@property (nonatomic, strong) UIColor *captionTextColor; // Defaults Black
@property (nonatomic, strong) UIColor *captionBackgroundColor; // Defaults White (with an alpha of .7f)
@property (nonatomic, strong) UIFont *captionFont; // Defaults to Helvetica 12.0f points

- (void) reloadData;
- (void) setCurrentPage:(NSUInteger)currentPage animated:(BOOL)animated;
- (void) updateCaptionLabelForImageAtIndex:(NSUInteger)index;

@end

Loading

0 comments on commit 9cad714

Please sign in to comment.