Swift

Swift 打印方法名,地址

2017-04-16  本文已影响87人  ping_oO

打印方法名

    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)")
     }
上一篇下一篇

猜你喜欢

热点阅读