项目示例在24小时格式中显示资源清单。
USAGE
-(void)prepareStatusDic
{
}
Above method will add event with different color in cell
NSArray *arr=[NSArray arrayWithObjects:@"1:40",@"2:40",@"DJ-IL",@"1",nil];
Array Element
1 - start time
2 - End time
3 - Text to display on event
4 - Color of event
Dictionary Element
someDictionary = @{@"0" : arr,@"2" : arr1,@"3" : arr2,@"4" : arr3};
Key - index of row at which you want to add event
value - event data
This display event call this method in collection view cell for row at index path delegate method
[hsc setUpCellWithArray:[someDictionary objectForKey:[NSString stringWithFormat:@"%ld",(long)cv.tag]]];
(UICollectionViewCell )collectionView:(UICollectionView )cv cellForItemAtIndexPath:(NSIndexPath *)indexPath
{
CellHorizontalScroll *hsc =[cv dequeueReusableCellWithReuseIdentifier:@"CellHorizontalScroll"
[hsc setBackgroundColor:[UIColor whiteColor]];
[hsc setUpCellWithArray:[someDictionary objectForKey:[NSString stringWithFormat:@"%ld",(long)cv.tag]]];
hsc.cellDelegate = self;
[hsc.scroll setFrame:CGRectMake(hsc.scroll.frame.origin.x, hsc.scroll.frame.origin.y, hsc.frame.size.width, 70 )];
hsc.scroll.contentOffset= CGPointMake(self.collEventTimeHeader.contentOffset.x,0.0);
return hsc;
}
To manage event click event use below custom delegate method of calender cell
-(void)callSelected:(id)sender
{
//Handle click event
}
To customize UI for event use below method
-(UIView )createCustomView:(NSArray )array
{
}
:)