iphone - KalViewController View 为黑色

标签 iphone ios objective-c xcode app-store

我在我的应用程序中使用 Kal 库作为日历 View ,但它显示为黑色,但是当我在另一个应用程序中添加相同的库时,例如新的 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];

它给了我这个

enter image description here

最佳答案

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

关于iphone - KalViewController View 为黑色,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15360087/

相关文章:

iphone - 将对象添加到数组不起作用,当我遍历数组时我看不到任何对象

iphone - 我们如何以编程方式更改 iPhone 屏幕的亮度?

iphone - UITableView,我如何知道 cellForRowAtIndexPath 期间的哪个部分?

iphone - 我将一些数据发送到 Web 服务,它返回一些 JSON 作为 NSData。如何转换为Dict?(iOS 4.3)

ios - 使用 OCUnit 对 keyWindow 进行单元测试会抛出错误

objective-c - iOS 6 - UIWebView loadHTMLString 无法正常工作

iphone - NSURLCache 不缓存

ios - 在 UITextField 中的字符后添加空格

iphone - 核心数据自定义部分标题/索引

objective-c - UIModalTransitionStyleFlipHorizo​​ntal 不起作用