Last active
December 6, 2019 13:42
-
-
Save romanfurman6/fe3f5c393e091b73f683a9003d8e53d9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import os.signpost | |
class ViewController: UIViewController { | |
let label = UILabel() | |
let viewDidLoadOSLog = OSLog(subsystem: "com.uptech.TestProject", category: .pointsOfInterest) | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
// some code here | |
os_signpost(.begin, log: viewDidLoadOSLog, name: "viewDidLoad") | |
// some code here | |
setupUI() | |
someWeirdFunc() | |
os_signpost(.end, log: viewDidLoadOSLog, name: "viewDidLoad") | |
// some code here | |
} | |
func setupUI() { | |
view.addSubview(label) | |
label.text = "" | |
} | |
func someWeirdFunc() { | |
for value in 0...9999 { label.text! += "\(value)" } | |
label.sizeToFit() | |
label.center = CGPoint( | |
x: view.frame.size.width / 2, | |
y: view.frame.size.height / 2 | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment