All Projects → iTofu → Lcbannerview

iTofu / Lcbannerview

Licence: mit
A very popular and highly customized banner view! Infinite loop support!

Projects that are alternatives of or similar to Lcbannerview

Eureka
Elegant iOS form builder in Swift
Stars: ✭ 11,345 (+7080.38%)
Mutual labels:  cocoapods
Wobbly
(Animate CSS) animations for iOS. An easy to use library of iOS animations. As easy to use as an easy thing.
Stars: ✭ 150 (-5.06%)
Mutual labels:  cocoapods
Apesuperhud
A simple way to display a HUD with a message or progress information in your application.
Stars: ✭ 156 (-1.27%)
Mutual labels:  cocoapods
Nearbyweather
NearbyWeather is an open source weather app for iOS, which uses the OpenWeatherMap API. With this project developers are invited to learn advanced iOS concepts, as well as to contribute further advancements. Fork this repo to get started.
Stars: ✭ 146 (-7.59%)
Mutual labels:  cocoapods
Cminputview
💪之前代码是基于UITextView进行的封装,侵入性较强,不方便使用,现使用Category重构代码,支持Cocoapods
Stars: ✭ 149 (-5.7%)
Mutual labels:  cocoapods
Termux Banner
Termux Banner Maker Script by Parixit Sutariya (BullAnonymous)
Stars: ✭ 151 (-4.43%)
Mutual labels:  banner
Color
Color utilities for macOS, iOS, tvOS, and watchOS
Stars: ✭ 145 (-8.23%)
Mutual labels:  cocoapods
Cdmarkdownkit
An extensive Swift framework providing simple and customizable markdown parsing.
Stars: ✭ 158 (+0%)
Mutual labels:  cocoapods
Pscarouselview
A drop-in carousel view. Most of Apps put it in their first screen.
Stars: ✭ 149 (-5.7%)
Mutual labels:  cocoapods
Underlinetextfield
Simple UITextfield Subclass with state
Stars: ✭ 156 (-1.27%)
Mutual labels:  cocoapods
Auth0.swift
Swift toolkit for Auth0 API
Stars: ✭ 146 (-7.59%)
Mutual labels:  cocoapods
Pclblureffectalert
Swift AlertController with UIVisualeffectview
Stars: ✭ 148 (-6.33%)
Mutual labels:  cocoapods
Swiftcolorgen
A tool that generate code for Swift projects, designed to improve the maintainability of UIColors
Stars: ✭ 152 (-3.8%)
Mutual labels:  cocoapods
Cloudcore
Framework that enables syncing between iCloud (CloudKit) and Core Data
Stars: ✭ 146 (-7.59%)
Mutual labels:  cocoapods
Accordionswift
The best way of implement an accordion menu using an UITableView in Swift
Stars: ✭ 156 (-1.27%)
Mutual labels:  cocoapods
Sffocusviewlayout
UICollectionViewLayout with focused content
Stars: ✭ 1,760 (+1013.92%)
Mutual labels:  cocoapods
Heapinspector For Ios
Find memory issues & leaks in your iOS app without instruments
Stars: ✭ 1,819 (+1051.27%)
Mutual labels:  cocoapods
Trilabelview
A triangle shaped corner label view for iOS written in Swift.
Stars: ✭ 158 (+0%)
Mutual labels:  cocoapods
Toroundedtableview
A subclass of UITableView that styles it like Settings.app on iPad
Stars: ✭ 157 (-0.63%)
Mutual labels:  cocoapods
Yzauthid
iOS TouchID(指纹)/ FaceID(面容)验证类库,代码简洁,高效
Stars: ✭ 154 (-2.53%)
Mutual labels:  cocoapods

LCBannerView

Travis CocoaPods CocoaPods CocoaPods LeoDev

🔥 A very popular and highly customized banner view! Infinite loop!

LCBannerView
In me the tiger sniffs the rose.

心有猛虎,细嗅蔷薇。

Welcome to my blog: http://LeoDev.me

中文介绍

Introduction

This is a display of advertising or information.

You can using the images from Local or Internet.

And it won't affect other scrollViews' scrollsToTop properties.

If you feel good, please give me a star, thank you very much! ⭐️

Installation

CocoaPods

LCBannerView is available on CocoaPods. Just add the following to your project Podfile:

pod "LCBannerView"  # Podfile

Non-CocoaPods Installation

Just drag the LCBannerView folder into your project.

Usage

  • Use by including the following import:

    #import "LCBannerView.h"
    
  • Demo code:

    // 1. From internet
    [scrollView addSubview:({
    
        LCBannerView *bannerView = [LCBannerView bannerViewWithFrame:CGRectMake(0, 300.0f, [UIScreen mainScreen].bounds.size.width, 200.0f)
                                                            delegate:self
                                                           imageURLs:URLs
                                                placeholderImageName:nil
                                                        timeInterval:2.0f
                                       currentPageIndicatorTintColor:[UIColor redColor]
                                              pageIndicatorTintColor:[UIColor whiteColor]];
        bannerView.pageDistance = 20.0f;
        bannerView;
    })];
    
    // 2. From local
    // If you using images from local, you should let images named: `[email protected]`, `[email protected]`...
    // Than, you just give me a image named: `banner`. 😜
    [scrollView addSubview:({
    
        LCBannerView *bannerView = [[LCBannerView alloc] initWithFrame:CGRectMake(0, 20.0f, [UIScreen mainScreen].bounds.size.width, 200.0f)
                                                              delegate:self
                                                             imageName:@"banner"
                                                                 count:3
                                                          timeInterval:3.0f
                                         currentPageIndicatorTintColor:[UIColor orangeColor]
                                                pageIndicatorTintColor:[UIColor whiteColor]];
        bannerView;
    })];
    
  • Advise for run demo:

    You should comment out one of the Block code or Delegate code in demo code, it will help you read code more clearly.

    See below two points for more information.

  • Block: (@optional)

    @property (nonatomic, copy) LCBannerViewDidClickedImageIndexBlock didClickedImageIndexBlock;
    
    @property (nonatomic, copy) LCBannerViewDidScrollToIndexBlock didScrollToIndexBlock;
    

    For example:

    bannerView.didClickedImageIndexBlock = ^(LCBannerView *bannerView, NSInteger index) {
        
        NSLog(@"Block: Clicked image in %p at index: %d", bannerView, (int)index);
    };
    
    bannerView.didScrollToIndexBlock = ^(LCBannerView *bannerView, NSInteger index) {
        
        NSLog(@"Block: Scrolled in %p to index: %d", bannerView, (int)index);
    };
    
    // Logs
    2016-07-29 15:41:00.344 LCBannerViewDemo[3251:295032] Block: Scrolled in 0x7ff473538ec0 to index: 1
    2016-07-29 15:41:03.343 LCBannerViewDemo[3251:295032] Block: Scrolled in 0x7ff473538ec0 to index: 2
    2016-07-29 15:41:05.132 LCBannerViewDemo[3251:295032] Block: Clicked image in 0x7ff473538ec0 at index: 2
    2016-07-29 15:41:06.344 LCBannerViewDemo[3251:295032] Block: Scrolled in 0x7ff473538ec0 to index: 0
    2016-07-29 15:41:09.344 LCBannerViewDemo[3251:295032] Block: Scrolled in 0x7ff473538ec0 to index: 1
    2016-07-29 15:41:12.342 LCBannerViewDemo[3251:295032] Block: Scrolled in 0x7ff473538ec0 to index: 2
    
  • Delegate: (@optional)

    - (void)bannerView:(LCBannerView *)bannerView didClickedImageIndex:(NSInteger)index;
    
    - (void)bannerView:(LCBannerView *)bannerView didScrollToIndex:(NSInteger)index;
    

    For example:

    - (void)bannerView:(LCBannerView *)bannerView didClickedImageIndex:(NSInteger)index {
        
        NSLog(@"Delegate: Clicked image in %p at index: %d", bannerView, (int)index);
    }
    
    - (void)bannerView:(LCBannerView *)bannerView didScrollToIndex:(NSInteger)index {
        
        NSLog(@"Delegate: Scrolled in %p to index: %d", bannerView, (int)index);
    }
    
    // Logs
    2016-07-29 15:41:45.296 LCBannerViewDemo[3293:296197] Delegate: Scrolled in 0x7f915b7349b0 to index: 1
    2016-07-29 15:41:47.300 LCBannerViewDemo[3293:296197] Delegate: Scrolled in 0x7f915b7349b0 to index: 0
    2016-07-29 15:41:48.429 LCBannerViewDemo[3293:296197] Delegate: Clicked image in 0x7f915b7349b0 at index: 0
    2016-07-29 15:41:49.308 LCBannerViewDemo[3293:296197] Delegate: Scrolled in 0x7f915b7349b0 to index: 1
    2016-07-29 15:41:51.297 LCBannerViewDemo[3293:296197] Delegate: Scrolled in 0x7f915b7349b0 to index: 0
    
  • Custom parameters:

    // Distance to bottom of pageControl. Default is `10.0f`.
    @property (nonatomic, assign) CGFloat   pageDistance;
    
    // Not allow scrolling. Default `No`, allow scrolling.
    @property (nonatomic, assign) BOOL      notScrolling;
    

ChangeLog

V 2.1.1

  • Hide pageControl support:

    // Hide or show pageControl. Default is `NO`, show pageControl.
    @property (nonatomic, assign) BOOL hidePageControl;
    

V 2.1.0

  • Implementation requirement: Issue 6 by skyboy1342.

    Now you could get the clicked image's index and the index scroll to, with Block or Delegate, see Usage.

  • Calculation: didScrollToIndex method won't be called to index 0 when you add bannerView to superView, because it hadn't scroll at all, and in fact you know index is 0 now because you do this.

V 2.0.0 (⚠️ Important)

  • Fix Issue 5, thx MVakas!

  • Modify some of the properties' name and methods' name:

    // Properties' name.
    @property (nonatomic, assign) CGFloat timerInterval;
    ->
    @property (nonatomic, assign) CGFloat timeInterval;
    
    @property (nonatomic, copy  ) NSString  *placeholderImage;
    ->
    @property (nonatomic, copy  ) NSString  *placeholderImageName;
    
    // All methods' name.
    timerInterval -> timeInterval
    placeholderImage -> placeholderImageName
    

V 1.2.5

  • Update README and some documents.

V 1.2.2

  • Update CocoaPods source URL.

V 1.2.0

  • You could custom the images should scrolling now, thx ac1dpax. For example:

    LCBannerView *bannerView = [[LCBannerView alloc] initWithFrame:CGRectMake(0, 20.0f, [UIScreen mainScreen].bounds.size.width, 200.0f)
                                                          delegate:self
                                                         imageName:@"banner"
                                                             count:3
                                                     timerInterval:3.0f
                                     currentPageIndicatorTintColor:[UIColor orangeColor]
                                            pageIndicatorTintColor:[UIColor whiteColor]];
    bannerView.pageDistance = 20.0f;
    bannerView.notScrolling = YES; // THIS LINE ⬅️
    bannerView;
    

V 1.1.0

  • You could custom page control bottom distance now. For example:

    // ...
    bannerView.pageDistance = 20.0f;
    

V 1.0.0

  • Initial commit.

Thanks

Support

  • If you have any question, just commit a issue :)

  • Mail: echo bGVvZGF4aWFAZ21haWwuY29tCg== | base64 -D or echo ZGV2dGlwQDE2My5jb20K | base64 -D

  • Blog: https://LeoDev.me

  • Donations:

    • PayPal:

      Donate

    • Alipay or Wechat Pay:

      Donate with Alipay or Wechat Pay

    Please note: donation does not imply any type of service contract.

License

MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].