I need a custom object (UIScheduleBar) built for the iPad that shows a visual representation of a schedule free/busy time between 8 AM - 5 PM. Please see attached image.
The custom object needs to have a "schedule" property that takes an array of "Start Time - End Time" objects, and instantly redraws the new schedule.
Typical usage in code:
In .h file:
-----------
UIScheduleBar *scheduleBar;
...
@property (nonatomic, retain) IBOutlet UIScheduleBar *scheduleBar;
In .m file:
-----------
NSMutableArray *scheduleArray = [NSMutableArray array];
[scheduleArray addObject:[[Event alloc] initWithStartTime:startTime1 EndTime:endTime2]];
[scheduleArray addObject:[[Event alloc] initWithStartTime:startTime2 EndTime:endTime2]];
...
// This call instantly updates the graphic area with the new schedule:
scheduleBar.schedule=scheduleArray;
We also have:
@interface Event: NSObject {
NSDate *startTime;
NSString *endTime;
}
I need to be able to create this custom object in my View either programmatically or from Interface Builder.
Please let me know if you have any questions.