【发布时间】:2013-03-12 11:36:37
【问题描述】:
我在我的应用程序中使用 Kal 库作为日历视图,但它显示为黑色,但是当我在另一个应用程序中添加相同的库时,例如新的 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];
它给了我这个
【问题讨论】:
-
是否与设置 backgroundColor 属性有关?你试过改变它吗?
-
是的,我试了一下,但没有任何改变
-
您可能忘记在您的应用资源中包含
Kal.bundle包 - 前几天我也遇到过这种情况。 -
@user1278066 你用哪个iphone模拟器/设备进行测试?
-
是的 Richard J.Ross 111 你是对的,请在答案部分写下你的答案,以便我可以选择它
标签: iphone ios objective-c xcode app-store