文章来源:淘论文网   发布者: 毕业设计   浏览量: 31



还可以点击去查询以下关键词:
[Swift3.0]    [三个]    [UIButton]    [无限]    [轮播]    [Swift3.0 三个UIButton 实现无限轮播]   

项目介绍:

LXCarouselImages

https://github.com/LXfeiYu/LXCarouselImages

功能:

1.可以选择开启和关闭定时器

2.有点击事件

使用方法:

//添加轮播图 let showView = LXShowView.init(frame: CGRect(x:0,y:20,width:self.view.frame.size.width,height:200)) showView.isUserInteractionEnabled = true showView.delegate = self //关闭定时器 // showView.isOpenTimer = false self.view.addSubview(showView) //数据 let path = Bundle.main.path(forResource: 'imageData', ofType: 'json') let jsonData = NSData.init(contentsOfFile: path!) //方法1 使用NSJSONSerialization解析 do { let json = try JSONSerialization.jsonObject(with: jsonData! as Data, options:[]) as! [String:AnyObject] let array=json['json'] as! NSArray for imageData in array{ let dict = imageData as! NSDictionary // print(dict['title']!) let model = Model.init(imageName: dict['imageName'] as! String, title: dict['title'] as! String) showView.dataArray.append(model) } }catch let error as NSError{ print('解析出错。\(error.localizedDescription)') }

点击事件

//点击轮播图 func clickImageView(index:NSInteger){ print('点击第\(index)个') }

有喜欢玩博客园的朋友吗? 可以加个好友

开题报告开题报告


这里还有:


还可以点击去查询:
[Swift3.0]    [三个]    [UIButton]    [无限]    [轮播]    [Swift3.0 三个UIButton 实现无限轮播]   

请扫码加微信 微信号:sj52abcd


下载地址: http://www.taolw.com/down/8099.docx
  • 上一篇:Swift写的评定制分控件
  • 下一篇:类似支付宝毕业设计咻咻动画