Xcode 标记:快捷方式
Xcode MARK: Shortcut
我不小心按下了键盘,Xcode 插入了
// MARK: - <#MyProtocolName#>
Xcode 插入 MARK: 评论的键盘快捷键是什么?
我没有自定义Xcode它能够读取我的协议名称并将其放入代码突出显示区域
// MARK: - Actionable
struct Foobar: Actionable
快捷键是:alt+cmd+/
我们必须在任何函数或方法之前或代码行顶部使用一个命令。
命令 + 选项 + /
如果它位于 collectionView 方法的顶部,它将像
// MARK: - CollectionView Methods
扩展 HomeViewController:UICollectionViewDelegate、UICollectionViewDataSource、UICollectionViewDelegateFlowLayout {
/// Collection Views for Fetured, Popular, Categories
///
/// - Parameters:
/// - collectionView: Data to be provided by service. Collection Views are categoriesCollectionView, popularCollectionView, feturedCollectionView
/// - section: retturn Value from Service
/// - Returns: return Value from Service
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return homeList.count
}
我不小心按下了键盘,Xcode 插入了
// MARK: - <#MyProtocolName#>
Xcode 插入 MARK: 评论的键盘快捷键是什么?
我没有自定义Xcode它能够读取我的协议名称并将其放入代码突出显示区域
// MARK: - Actionable
struct Foobar: Actionable
快捷键是:alt+cmd+/
我们必须在任何函数或方法之前或代码行顶部使用一个命令。
命令 + 选项 + /
如果它位于 collectionView 方法的顶部,它将像
// MARK: - CollectionView Methods
扩展 HomeViewController:UICollectionViewDelegate、UICollectionViewDataSource、UICollectionViewDelegateFlowLayout {
/// Collection Views for Fetured, Popular, Categories
///
/// - Parameters:
/// - collectionView: Data to be provided by service. Collection Views are categoriesCollectionView, popularCollectionView, feturedCollectionView
/// - section: retturn Value from Service
/// - Returns: return Value from Service
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return homeList.count
}