I'm trying to make a 'daily bible verse' feature in my app where it shows you a new bible verse everyday. I am planning on making an nsarray with like 100 strings which would be 100 bible verses, and then once a day it shows you a different bible verse, how can i do this?
NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
NSDateComponents *dateComponents = [gregorian components:(NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit) fromDate:yourDateHere];
NSInteger hour = [dateComponents hour];
NSInteger minute = [dateComponents minute];
NSInteger second = [dateComponents second];
Swift
let calendar = Calendar.current
let dateComponents = calendar.dateComponents([.hour, .minute, .second], from: date)
let hour = dateComponents.hour
let minute = dateComponents.minute
let second = dateComponents.second