iOS Dev Nugget 73 Open Source Date Picker from Square


Need to run a code review on your codebase? Hire me

Ever want to include a date picker in your app but don't like how UIDatePicker – and more generally, UIPickerView – looks?

Square has a gorgeous and open source monthly calendar picker available. There's a write up on it including sample code:

CGRect frame = self.parentViewController.view.bounds;
self.view = [[TSQCalendarView alloc] initWithFrame:frame];
self.calendarView.firstDate = [NSDate date];
self.calendarView.lastDate = [[NSDate date] dateByAddingTimeInterval:60 * 60 * 24 * 279.5]; // approximately 279.5 days in the future
self.calendarView.delegate = self;

Bonus: there's even an equivalent Android version available.

Your feedback is valuable: Do you want more nuggets like this?   Yes   or   No



Like this and want such iOS dev nuggets to be emailed to you, weekly?

Sign Me Up! or follow @iosdevnuggets on Twitter


View archives of past issues