Add cancel button to Twitter Add Feed

This commit is contained in:
Maurice Parker 2020-08-11 17:07:36 -05:00
parent 0cb0bc357a
commit 0835e789e5
2 changed files with 11 additions and 1 deletions

View File

@ -139,7 +139,13 @@
<outlet property="delegate" destination="q78-0w-suH" id="j69-O6-ths"/>
</connections>
</tableView>
<navigationItem key="navigationItem" title="Select Twitter Type" id="kjr-7P-QSh"/>
<navigationItem key="navigationItem" title="Select Twitter Type" id="kjr-7P-QSh">
<barButtonItem key="leftBarButtonItem" systemItem="cancel" id="xkx-QM-tXd">
<connections>
<action selector="cancel:" destination="q78-0w-suH" id="3LG-Q8-Aqh"/>
</connections>
</barButtonItem>
</navigationItem>
<simulatedNavigationBarMetrics key="simulatedTopBarMetrics"/>
</tableViewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="yI5-IG-7Sl" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>

View File

@ -18,6 +18,10 @@ class TwitterSelectTypeTableViewController: UITableViewController {
twitterFeedProviders = ExtensionPointManager.shared.activeExtensionPoints.values.compactMap { $0 as? TwitterFeedProvider }
}
@IBAction func cancel(_ sender: Any) {
dismiss(animated: true)
}
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = super.tableView(tableView, cellForRowAt: indexPath)
if indexPath.row < 2 {