I am very new to Swift (got started this week) and I\'m migrating my app from Objective-C. I have basically the following code in Objective-C that works fine:
Swift 5
@IBAction func selectFilter(sender: AnyObject) { timeFilterSelected = MyTimeFilter(rawValue: sender.tag) }