在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:CFBannerView开源软件地址:https://gitee.com/chengfeisoft/CFBannerView开源软件介绍:CFBannerViewExampleTo run the example project, clone the repo, and run Uselet bannerView = CFBannerView(frame:frame)bannerView.dataSource = selfbannerView.delegate = selfbannerView.reloadData() extension ViewController:CFBannerViewDataSource,CFBannerViewDelegate{ func numberOfItems() -> Int { return banners.count } func viewForItem(bannerView: CFBannerView, index: Int) -> UIView { let imageView = UIImageView(frame: bannerView.bounds) imageView.sd_setImage(with: URL(string: banners[index]), placeholderImage: UIImage(named: "default")) return imageView } func didSelectItem(index: Int) { print(index) }} Requirements
InstallationCFBannerView is available through CocoaPods. To installit, simply add the following line to your Podfile: pod "CFBannerView" Authorchengfei.heng, [email protected] LicenseCFBannerView is available under the MIT license. See the LICENSE file for more info. |
请发表评论