Swift注释

Swift注释

//MARK: 对方法注释

//MARK: -创建 TableView
    func createTableView() {
        tableViewPlain = UITableView(frame: CGRect(x: 0, y: 70, width: KScreenWidth / 2, height: KScreenHeight - 70), style: .plain)
        tableViewPlain.delegate = self
        tableViewPlain.dataSource = self
        tableViewPlain.tableFooterView = UIView()
        self.view.addSubview(tableViewPlain)
    }
Swift注释_第1张图片
MARK:注释

//TODO: 有待完成的代码

 //TODO: -CollectionView 创建
    func createCollectionView()  {
        let layout = UICollectionViewFlowLayout()
        layout.itemSize = CGSize(width: 50, height: 40)
        layout.minimumLineSpacing = 10
        layout.minimumInteritemSpacing = 20
        layout.sectionInset = UIEdgeInsetsMake(10, 10, 10, 10)
        
        collectionView = UICollectionView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight), collectionViewLayout: layout)
        collectionView.delegate = self
        collectionView.dataSource = self
        indentity = "Cell"
        collectionView.register(UINib(nibName: "Cell", bundle: nil), forCellWithReuseIdentifier: indentity)
        view.addSubview(collectionView)
    }
Swift注释_第2张图片
TODO:注释

//FIXME: 代码修改过

 //FIXME: -返回界面
    func dismissAction(_ sender: UIButton) {
        self.dismiss(animated: true) { 
            print("我退出了第一个界面" + "button tag:\(sender.tag)")
        }
    }

FIXME:注释

你可能感兴趣的:(Swift注释)