Skip to content

Instantly share code, notes, and snippets.

@NahuelBorromeo
Last active August 21, 2024 19:45
Show Gist options
  • Save NahuelBorromeo/c94de4094db5d2206b5a04fa7cfe5b00 to your computer and use it in GitHub Desktop.
Save NahuelBorromeo/c94de4094db5d2206b5a04fa7cfe5b00 to your computer and use it in GitHub Desktop.
my xcode snippets
Mark:
// MARK: - <#Message#>
DebugPrint:
pp
print("DEBUG PRINT:", <#Message#>)
SetupUI:
private func setupUI() {
self.view.addSubview(<#T##UIView#>)
<#T##UIView#>.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
<#T##UIView#>.topAnchor.constraint(equalTo: self.view.topAnchor),
<#T##UIView#>.bottomAnchor.constraint(equalTo: self.view.bottomAnchor),
<#T##UIView#>.leadingAnchor.constraint(equalTo: self.view.leadingAnchor),
<#T##UIView#>.trailingAnchor.constraint(equalTo: self.view.trailingAnchor),
<#T##UIView#>.centerXAnchor.constraint(equalTo: self.view.centerXAnchor),
<#T##UIView#>.centerYAnchor.constraint(equalTo: self.view.centerYAnchor),
<#T##UIView#>.widthAnchor.constraint(equalToConstant: <#Double#>),
<#T##UIView#>.heightAnchor.constraint(equalToConstant: <#Double#>),
])
}
ToDo:
// TODO: - <#Message#>
UILabel Comp:
private let label: UILabel = {
let label = UILabel()
label.textColor = .label
label.textAlignment = .center
label.font = .systemFont(ofSize: 16, weight: .regular)
label.text = "Title"
return label
}()
ViewController Sections:
// MARK: - Variables
// MARK: - UI Components
// MARK: - LifeCycle
// MARK: - UI Setup
// MARK: - Selectors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment