加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

iphone – KalViewController视图是黑色的

发布时间:2020-12-14 17:29:20 所属栏目:百科 来源:网络整理
导读:我在我的应用程序中使用Kal Library for Calendar视图,但它显示为黑色,但是当我在另一个应用程序中添加相同的库,例如新的SingleViewApp,它工作正常并显示正常的日历 我的代码是 kal = [[KalViewController alloc] init];kal.title = @"NativeCal";kal.naviga
我在我的应用程序中使用Kal Library for Calendar视图,但它显示为黑色,但是当我在另一个应用程序中添加相同的库,例如新的SingleViewApp,它工作正常并显示正常的日历

我的代码是

kal = [[KalViewController alloc] init];
kal.title = @"NativeCal";

kal.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle:@"Today" style:UIBarButtonItemStyleBordered target:self action:@selector(showAndSelectToday)] autorelease];

kal.delegate = self;
dataSource = [[EventKitDataSource alloc] init];
kal.dataSource = dataSource;

// Setup the navigation stack and display it.
navController = [[UINavigationController alloc] initWithRootViewController:kal];



UITabBarController *tabBar  = [[UITabBarController alloc]init];
tabBar.viewControllers = [NSArray arrayWithObject:navController];

self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
self.window.rootViewController = tabBar;
[self.window makeKeyAndVisible];

它给了我这个

解决方法

问题是您忘记在项目资源中包含Kal.bundle文件,其中包含Kal的所有资源.只需将捆绑包拖入Xcode项目即可.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读