Skip to content

Commit 38e7587

Browse files
authored
Merge pull request #60 from TaskarCenterAtUW/feature-show-queslist-on-map
Show QuestsList on Map
2 parents 72a2e4a + 499b599 commit 38e7587

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

GoInfoGame/GoInfoGame/UI/MapViewController.swift

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,18 @@ class MapViewController: UIHostingController<MapView> {
1414
super.viewDidLoad()
1515

1616
// Do any additional setup after loading the view.
17+
18+
let questListButton = UIBarButtonItem(barButtonSystemItem: .search, target: self, action: #selector(questListButtonTapped))
19+
navigationItem.rightBarButtonItem = questListButton
1720
}
21+
1822
required init?(coder aDecoder: NSCoder) {
19-
super.init(coder: aDecoder, rootView: MapView())
20-
}
23+
super.init(coder: aDecoder, rootView: MapView())
24+
}
25+
26+
@objc func questListButtonTapped() {
27+
let questListView = QuestsListUIView()
28+
let hostingController = UIHostingController(rootView: questListView)
29+
present(hostingController, animated: true, completion: nil)
30+
}
2131
}

0 commit comments

Comments
 (0)