Swift 打印方法名,地址

打印方法名

    let file = #file
    let functionName = #function
    let line = #line
    print(file + "__\(line)__:"+functionName)

打印地址

     var point = CGPoint.zero
     withUnsafePointer(to: &point) {
        print(" str value \(point) has address: \($0)")
     }

你可能感兴趣的:(Swift 打印方法名,地址)