简体   繁体   English

Kal日历月未显示

[英]Kal calendar month not showing

Here is the link to the github https://github.com/phaibin/Kal 这是指向github https://github.com/phaibin/Kal的链接

This is what it is suppose to look like 这是应该看起来像的样子 在此处输入图片说明

However this is what I am getting 但是,这就是我得到的 在此处输入图片说明

Here are the codes .h file: #import 以下是代码.h文件:#import

@class KalViewController;

@interface Planner_Calendar : UIViewController <UIApplicationDelegate, UITableViewDelegate>{
    KalViewController *kal;
    id dataSource;
}
@property (strong, nonatomic) IBOutlet UIView *calendarView;

@end

.m file: .m文件:

#import "EventKitDataSource.h"
#import "Kal.h"
#import "NSDate+Convenience.h"
#import <EventKit/EventKit.h>
#import <EventKitUI/EventKitUI.h>

@implementation Planner_Calendar
@synthesize calendarView;

-(void)viewDidLoad{
    kal = [[KalViewController alloc] initWithSelectionMode:KalSelectionModeSingle];
    kal.selectedDate = [NSDate dateStartOfDay:[NSDate date]];

    kal.title = @"NativeCal";
    kal.delegate = self;
    dataSource = [[EventKitDataSource alloc] init];
    kal.dataSource = dataSource;

    [self.calendarView addSubview:kal.view];
}

@end

To fix this problem Add Localizable.strings file to Your Project 解决此问题的方法将Localizable.strings文件添加到您的项目中

you can get this file From Here 你可以从这里得到这个文件

To Add it 要添加

File ---> Add Files to "your Project name" 文件--->将文件添加到“您的项目名称”

在此处输入图片说明

the file contain 该文件包含

"CalendarTitle"     = "LLLL yyyy";

if your already have this file , then just add this line of code 如果您已经有此文件,则只需添加此行代码

if you dont have it its ok 如果没有的话

Go to File > New > File. 转到文件>新建>文件。 Choose Strings File unders the Resource subsection as shown below: 在“资源”小节下选择“字符串文件”,如下所示:

在此处输入图片说明

Click Next, name the file Localizable.strings, then click Save. 单击“下一步”,将文件命名为Localizable.strings,然后单击“保存”。

write inside it "CalendarTitle" = "LLLL yyyy"; 在其中写上"CalendarTitle" = "LLLL yyyy";

只需向应用程序添加本地化字符串即可解决此问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM