1.UICollectionView横向滚动到某个item
[_collectionViewscrollToItemAtIndexPath:indexPathatScrollPosition:UICollectionViewScrollPositionNoneanimated:NO];
如果collectionView使用xib拖的,并且加了约束,需要给collectionView的frame赋值
2.button字体左对齐
[_deleteBtn setContentHorizontalAlignment:UIControlContentHorizontalAlignmentLeft];
3.collectionView左右缩进
layout.sectionInset = UIEdgeInsetsMake(0, 15, 0, 15);
4.在做屏幕旋转的时候,
5.在做masonry动画时,会遇到动画过程中所有的子视图都跟着动画,且动画变形的效果,这时候在动画之前要先加上[subview.superView layoutIfNeeded], 然后在做masonry动画.
6.OCLint编译
(1)编译工程
xcodebuild -workspace YuneecApp.xcworkspace -scheme YuneecApp clean build | tee xcodebuild.log | xcpretty --report json-compilation-database
(2)将文件移到根目录
mv build/reports/compilation_db.json compile_commands.json
(3)将报错信息导成html文件
oclint-json-compilation-database -e Pods -v -- -report-type html -o report.html -max-priority-1=9999 -max-priority-2=9999 -max-priority-3=9999
(4)其他
网友评论