Ben Dodson

Freelance iOS, Apple Watch, and Apple TV Developer

A Month-Year UIPickerView Written In Swift

I’ve just shared some code on GitHub which may be useful to somebody; MonthYearPickerView-Swift. It’s a basic UIPickerView subclass that allows you to choose just a month and year in a scrolling picker. This is useful for things such as expiration dates on credit cards. It uses a simple block-based callback to let you know once a date has been selected and may be a good way of seeing how to make other custom pickers if you are new to iOS or Swift.

Check out MonthYearPickerView-Swift on GitHub.

Update (2015-10-07): The project has been updated to support Swift 2.0 and is compatible with Storyboards and Xib files. I’ve added tags to the repository so you can choose if you want the Swift 1.2 or Swift 2.0 version.

iTunes Artwork Finder Source Code » « TV for the UK politics fan