ios中VRGCalendarView日历控件

http://pan.baidu.com/share/link?shareid=4166002480&uk=923776187 

官网 https://github.com/TjeerdVurig/Vurig-Calendar

技术分享
#import <UIKit/UIKit.h>
#import "VRGCalendarView.h"

@interface ViewController : UIViewController<VRGCalendarViewDelegate>

@end




#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    VRGCalendarView *calendarView=[[VRGCalendarView alloc] init];
    calendarView.delegate=self;
    [self.view addSubview:calendarView];
    [calendarView release];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

#pragma mark -VRG delegate
-(void)calendarView:(VRGCalendarView *)calendarView switchedToMonth:(int)month targetHeight:(float)targetHeight animated:(BOOL)animated{
    NSLog(@" switch--->%zi",month);
    if (month==[[NSDate date] month]) {
        NSArray *dataArrary=@[@1,@5];
        [calendarView markDates:dataArrary];
    }
}
-(void)calendarView:(VRGCalendarView *)calendarView dateSelected:(NSDate *)date{
 
    NSLog(@"select data-->%@",date);
}

@end
技术分享

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。