To select a photo from your library we can use the built in UIImagePickerController. This is simple to use and allows you to select and use an image already saved to your device. To start with we create a new UIImagePickerController class with: let imagePickerController = UIImagePickerController() We then assign its delegate and set its sourceType which below […]
Month: November 2015
NSDate addition using NSCalendar
If you have an NSDate and want to add a time unit onto that date, then an option is to use the NSCalendar. This will allow you to add to the date via the dateByAddingUnit, which allows you to add an NSCalendarUnit. These units could be for example: hours, days, months, years, minutes. Once you […]