DSCollectionView

上传者: 42133969 | 上传时间: 2022-09-20 17:41:44 | 文件大小: 152KB | 文件类型: ZIP
DSCollectionView 索引条部分使用UIView 的 layoutSubviews绘制字母和边框线 setNeedsDisplay会调用自动调用drawRect方法,这样可以拿到UIGraphicsGetCurrentContext,就可以画画了。而setNeedsLayout会默认调用layoutSubViews,就可以处理子视图中的一些数据。  宗上所诉,setNeedsDisplay方便绘图,而layoutSubViews方便出来数据。      因为这两个方法都是异步执行的,所以一些元素还是直接绘制的好 使用CAShapeLayer与UIBezierPath可以实现不在view的drawRect方法中就画出一些想要的图形,在这里使用CAShapeLayer绘制索引表的边框线 根据手势来判断显示中间的索引块 //开始触摸 -(void)touchesBegan:(NSSe

文件下载

资源详情

[{"title":"( 32 个子文件 152KB ) DSCollectionView","children":[{"title":"DSCollectionView-master","children":[{"title":"README.md <span style='color:#111;'> 1.65KB </span>","children":null,"spread":false},{"title":"UICollectionDemo.xcodeproj","children":[{"title":"project.xcworkspace","children":[{"title":"contents.xcworkspacedata <span style='color:#111;'> 161B </span>","children":null,"spread":false},{"title":"xcshareddata","children":[{"title":"UICollectionDemo.xccheckout <span style='color:#111;'> 1.49KB </span>","children":null,"spread":false}],"spread":true},{"title":"xcuserdata","children":[{"title":"YMY.xcuserdatad","children":[{"title":"UserInterfaceState.xcuserstate <span style='color:#111;'> 20.09KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"project.pbxproj <span style='color:#111;'> 18.66KB </span>","children":null,"spread":false},{"title":"xcuserdata","children":[{"title":"YMY.xcuserdatad","children":[{"title":"xcschemes","children":[{"title":"UICollectionDemo.xcscheme <span style='color:#111;'> 4.28KB </span>","children":null,"spread":false},{"title":"xcschememanagement.plist <span style='color:#111;'> 578B </span>","children":null,"spread":false}],"spread":true},{"title":"xcdebugger","children":[{"title":"Breakpoints_v2.xcbkptlist <span style='color:#111;'> 1.14KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"UICollectionDemo","children":[{"title":"AppDelegate.h <span style='color:#111;'> 274B </span>","children":null,"spread":false},{"title":"ViewController.h <span style='color:#111;'> 362B </span>","children":null,"spread":false},{"title":"Base.lproj","children":[{"title":"Main.storyboard <span style='color:#111;'> 1.54KB </span>","children":null,"spread":false},{"title":"LaunchScreen.xib <span style='color:#111;'> 3.62KB </span>","children":null,"spread":false}],"spread":true},{"title":"Util","children":[{"title":"StickyHeaderLayout.m <span style='color:#111;'> 3.59KB </span>","children":null,"spread":false},{"title":"StickyHeaderLayout.h <span style='color:#111;'> 227B </span>","children":null,"spread":false},{"title":"AIMTableViewIndexBar","children":[{"title":".DS_Store <span style='color:#111;'> 6.00KB </span>","children":null,"spread":false}],"spread":true},{"title":".DS_Store <span style='color:#111;'> 6.00KB </span>","children":null,"spread":false},{"title":"DSCollectionKit","children":[{"title":"DSCollectionViewIndex.h <span style='color:#111;'> 1.19KB </span>","children":null,"spread":false},{"title":"DSCollectionView.m <span style='color:#111;'> 3.86KB </span>","children":null,"spread":false},{"title":"DSCollectionView.h <span style='color:#111;'> 555B </span>","children":null,"spread":false},{"title":"DSCollectionViewIndex.m <span style='color:#111;'> 4.73KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"main.m <span style='color:#111;'> 331B </span>","children":null,"spread":false},{"title":"Images.xcassets","children":[{"title":"dog.imageset","children":[{"title":"Contents.json <span style='color:#111;'> 174B </span>","children":null,"spread":false},{"title":"dog.png <span style='color:#111;'> 110.62KB </span>","children":null,"spread":false}],"spread":true},{"title":".DS_Store <span style='color:#111;'> 6.00KB </span>","children":null,"spread":false},{"title":"AppIcon.appiconset","children":[{"title":"Contents.json <span style='color:#111;'> 2.76KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"Info.plist <span style='color:#111;'> 1.47KB </span>","children":null,"spread":false},{"title":"AppDelegate.m <span style='color:#111;'> 1.98KB </span>","children":null,"spread":false},{"title":".DS_Store <span style='color:#111;'> 6.00KB </span>","children":null,"spread":false},{"title":"ViewController.m <span style='color:#111;'> 6.77KB </span>","children":null,"spread":false}],"spread":true},{"title":"UICollectionDemoTests","children":[{"title":"UICollectionDemoTests.m <span style='color:#111;'> 883B </span>","children":null,"spread":false},{"title":"Info.plist <span style='color:#111;'> 746B </span>","children":null,"spread":false}],"spread":true},{"title":".DS_Store <span style='color:#111;'> 6.00KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明