WWLogView
一個簡單的Log視窗版 (上傳至Cocoapods)
使用範例
import UIKit
import WWLogView
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
_ = WWLogView.shared
return true
}
}
import UIKit
import WWLogView
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
}
@IBAction func showWindow(_ sender: UIButton) {
let time = Date()
WWLog(time.description(with: Locale.init(identifier: "zh-TW")))
}
}