Skip to content

Commit d872bc3

Browse files
author
Ignacio Romero Zurbuchen
authored
Merge pull request slackhq#549 from algrid/fix-509
Call registerClass before super.viewDidLoad() in swift code
2 parents 08fdbfc + 0c2f27f commit d872bc3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Examples/Messenger-Swift/MessageViewController.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,19 @@ class MessageViewController: SLKTextViewController {
4040
func commonInit() {
4141

4242
NotificationCenter.default.addObserver(self.tableView, selector: #selector(UITableView.reloadData), name: NSNotification.Name.UIContentSizeCategoryDidChange, object: nil)
43-
NotificationCenter.default.addObserver(self, selector: #selector(MessageViewController.textInputbarDidMove(_:)), name: NSNotification.Name.SLKTextInputbarDidMove, object: nil)
44-
43+
NotificationCenter.default.addObserver(self, selector: #selector(MessageViewController.textInputbarDidMove(_:)), name: NSNotification.Name.SLKTextInputbarDidMove, object: nil)
44+
}
45+
46+
override func viewDidLoad() {
47+
4548
// Register a SLKTextView subclass, if you need any special appearance and/or behavior customisation.
4649
self.registerClass(forTextView: MessageTextView.classForCoder())
4750

4851
if DEBUG_CUSTOM_TYPING_INDICATOR == true {
4952
// Register a UIView subclass, conforming to SLKTypingIndicatorProtocol, to use a custom typing indicator view.
5053
self.registerClass(forTypingIndicatorView: TypingIndicatorView.classForCoder())
5154
}
52-
}
53-
54-
override func viewDidLoad() {
55-
55+
5656
super.viewDidLoad()
5757

5858
self.commonInit()

0 commit comments

Comments
 (0)