MKCarouselView是一个类似一些网站上的循环轮播广告控件
-
文件两个类:
MKCarouselView和MKCarouselViewCell
,类似于Tableview和Tableviewcell
-
数据源代理:
MKCarouselViewDataSource
- (NSInteger)numberOfCellInCarouselView:(MKCarouselView *)carouselView;
- (MKCarouselViewCell *)carouselView:(MKCarouselView *)carouselView cellForIndex:(NSInteger)index;
- 点击事件代理:
MKCarouselViewDelegate
- (void)carouselView:(MKCarouselView *)carouselView didClickTheCellAtIndex:(NSInteger)index;
- 缓存使用方法:
- (MKCarouselViewCell *)dequeueReusableCellWithIdentifier:(NSString *)indentifier;
To run the example project, clone the repo, and run pod install
from the Example directory first.
MKCarouselView is available through CocoaPods. To install it, simply add the following line to your Podfile:
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!
target '<Your Target Name>' do
pod 'MKCarouselView'
end
MKCarouselView is available under the MIT license. See the LICENSE file for more info.