如果没有使用JTCalendar的Storyboard / Xib,我没有得到如何使用。 通常任何视图都可以为Ex添加超级视图:[self.view addSubview:SampleView1] 如何添加自定义视图。
#import <UIKit/UIKit.h>
#import "JTCalendar/JTCalendar.h"
@interface GitCalendarViewController : UIViewController <JTCalendarDelegate>
@property (weak, nonatomic) IBOutlet JTCalendarMenuView *calendarMenuView;
@property (weak, nonatomic) IBOutlet JTHorizontalCalendarView *calendarContentView;
@property (strong, nonatomic) JTCalendarManager *calendarManager;
@implementation ViewController
- (void)viewDidLoad
{
[super viewDidLoad];
_calendarManager = [JTCalendarManager new];
_calendarManager.delegate = self;
[_calendarManager setMenuView:_calendarMenuView];
[_calendarManager setContentView:_calendarContentView];
[_calendarManager setDate:[NSDate date]];
}
如何添加我的子视图。请帮帮我
答案 0 :(得分:0)
[self.view addSubview:_calendarManager];
不起作用? calendarManager是哪个类的子类?