Latest 1.1.2
Homepage https://github.com/skswhwo/UICarouselScrollView
License MIT
Platforms ios 7.0, requires ARC
Authors

Horizontal scrollable view with specific content width.

alt text
alt text

Installation

UICarouselScrollView is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "UICarouselScrollView"

And then run:

$ pod install

Usage

Delegate

@required
- (UIView *)carouselScrollView:(UICarouselScrollView *)view viewAtPage:(NSInteger)page;

@optional
- (void)carouselScrollView:(UICarouselScrollView *)view clickedAtPage:(NSInteger)page;
- (NSString *)carouselScrollView:(UICarouselScrollView *)view titleAtPage:(NSInteger)page;
- (NSString *)carouselScrollView:(UICarouselScrollView *)view subTitleAtPage:(NSInteger)page;

Nib

[self.nibView setDelegate:self];
[self.nibView setSlideTime:3];
[self.nibView setShouldDetectNextAndPreviousClickEvent:NO];
[self.nibView setGradientColors:@[(id)[[UIColor blackColor] colorWithAlphaComponent:0].CGColor,(id)[[UIColor blackColor] colorWithAlphaComponent:0.6].CGColor]];

Programmatically

carouselView = [[UICarouselScrollView alloc] initWithFrame:CGRectMake(10, 300, 260, 180)];
[self.view addSubview:carouselView];
[carouselView setDelegate:self];
[carouselView setMaxWidth:200];
[carouselView setSlideTime:2];
[carouselView setShouldDetectNextAndPreviousClickEvent:NO];
[carouselView setGradientColors:@[(id)[[UIColor blackColor] colorWithAlphaComponent:0].CGColor,(id)[[UIColor blackColor] colorWithAlphaComponent:0.6].CGColor]];

Properties

@property (nonatomic, assign) NSInteger numberOfPage;   //trigger
@property (nonatomic, assign) NSInteger cacheCount; //default = 2 (previous&next pages)
@property (nonatomic, assign) float slideTime;  //if 0, don't auto slide
@property (nonatomic, assign) float maxWidth;   //if 0, view size
@property (nonatomic, assign) BOOL shouldDetectNextAndPreviousClickEvent;

Author

skswhwo, [email protected]

License

UICarouselScrollView is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "UICarouselScrollView",
    "version": "1.1.2",
    "platforms": {
        "ios": "7.0"
    },
    "summary": "Horizontal carousel scrollview with specific content size",
    "homepage": "https://github.com/skswhwo/UICarouselScrollView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "skswhwo": "[email protected]"
    },
    "source": {
        "git": "https://github.com/skswhwo/UICarouselScrollView.git",
        "tag": "1.1.2"
    },
    "source_files": "UICarouselScrollView/Classes/**/*.{h,m}",
    "resources": "UICarouselScrollView/Classes/**/*.{png,bundle,xib,nib}",
    "requires_arc": true
}

Pin It on Pinterest

Share This