Created
February 28, 2020 12:41
-
-
Save yusufozgul/9f0c77c1c5bd707c5d45be42b1b71bc6 to your computer and use it in GitHub Desktop.
This file contains 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 | |
class DetailViewController: UIViewController | |
{ | |
var selectedText: String? | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
let label = UILabel() | |
label.text = "Selected Row: \(selectedText ?? "NO TEXT")" | |
label.sizeToFit() | |
label.center = view.center | |
self.view.addSubview(label) | |
self.view.backgroundColor = .systemBackground | |
} | |
init(selectedText: String) { | |
super.init(nibName: nil, bundle: nil) | |
self.selectedText = selectedText | |
} | |
required init?(coder: NSCoder) { | |
fatalError("Error") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment