Swift中代碼組織符號
Objective c中,一般使用pragma mark - 說明文字組織代碼,在Swift中變了,如下所示
//MARK: - 說明文字
//FIXME: - 說明文字
//TODO: - 說明文字
函數(shù)注釋
command + option + "/" 組合鍵給函數(shù)注釋
查看函數(shù)注釋
option + 鼠標左鍵 查看函數(shù)注釋
Debug
Swift 有 #file, #function, #line and #column.
#file - String - The name of the file in which it appears.
#line - Int - The line number on which it appears.
#column - Int - The column number in which it begins.
#function - String - The name of the declaration in which it appears.