List View

The MAFCalendarListView displays appointments in a list, separated by day.

The list includes only days that have appointments, and only the starting times of the appointments. A segmentation header separates the days. Each appointment appears as a cell in one of the list view sections. By default, the cell shows description, location, and starting time. The list view can show appointments of multiple calendars at the same time. The calendar color code appears at the left side of each appointment cell:
List View

Presenting the List View

Use <MAFListCalendarView> to present the list view. The code sample below demonstrates a simple way to set up a list view. The input is a UIViewController instance that you can use later to present the initialized list view. After calling this method, make sure you have implemented the necessary Datasource and Delegate methods.
-(void)setupListView:(UIViewController*)vc
{
    NSArray* views = [vc.view subviews];
    if([views count]>0){
        for(UIView* view in views){
            [view removeFromSuperview];
        }
    }
    if(self.interfaceOrientation==UIInterfaceOrientationLandscapeLeft||self.interfaceOrientation==UIInterfaceOrientationLandscapeRight){
        
    UIView* view = [[UIView alloc] 
					initWithFrame:CGRectMake(0, 44, 480, 367)];
    view.backgroundColor = [UIColor whiteColor];
        
    UILabel *notsuplab = [self labelWithFrame:CGRectMake(0, 0, 400, 100)];
        
    [view addSubview:notsuplab];
    [vc.view addSubview:view];
    [view release];
} else {
	NSDate* start = [[MAFDateFormatter instance] 
	createDateFromString:@"01-01-2012 00:00" 
		withFormat:@"dd-MM-yyyy HH:mm"];
    NSDate* end   = [[MAFDateFormatter instance]
			createDateFromString:@"31-12-2012 23:59" 
			withFormat:@"dd-MM-yyyy HH:mm"]; 
    MAFListCalendarView* listView = [[MAFListCalendarView alloc] 
			initWithFrame:CGRectMake(0, 44, 320, 367)];
    listView.tag = 42;
    listView.delegate = self;
    listView.datasource = self;
    [listView setDateRangeToStart:start andEnd:end];
        
    [vc.view addSubview:listView];
    [listView release];
}
}

It is your task to initialize the appointments. For example, create MAFAppointment objects and store them in memory.