You have to change it yourself, but it is quite easy to get todays date.
And then from that date geting the day of the month is quite simple, here is how you can do it:
- (UIImage*)todaysImage{
//Get todays date
NSDate *today = [NSDate date];
//Get the number using NSDateComponents
NSDateComponents *components = [[NSCalendar currentCalendar] components:NSDayCalendarUnit fromDate:today];
NSInteger day = [components day];
//Load the apropiate image based on the number (this means you have an image for all 31 posible days)
//This line also asumes your images are named DayImage-1.png, DayImage-2.png, DayImage-3.png, etc...
UIImage *todaysDateImage = [UIImage imageNamed:[NSString stringWithFormat:@"DayImage-%d.png",day]];
return todaysDateImage;
}
Then to set the image on yhou tab bar you would just call:
tabItem.image = [self todaysImage];
You could also generate your own images on the fly (and caching them so you dont have to generate every time). If you are interested in something like that, have a look at this:
How to capture UIView to UIImage without loss of quality on retina display
It will show you how to render a UIView into a UIImage object to use instead of having to pre-load all 31 images into the app.