UIKit
这本书主要是用来记录 UIKit 中控件的基本使用。
override func viewDidLoad() {
super.viewDidLoad()
collectionView.dataSource = self
collectionView.registerClass(UICollectionViewCell.classForCoder(), forCellWithReuseIdentifier: "cell")
navigationItem.rightBarButtonItem = UIBarButtonItem(title: "编辑", style: .Done, target: self, action: #selector(rightItemAction))
title = "delete and add 动画"
view.addSubview(collectionView)
collectionView.snp_makeConstraints { (make) in
make.edges.equalTo(self.view)
}
}