我使用UIView
(命名为“DateTimeView”)& UIDatePicker
中的AppDelegate
(名为“pcvDateTime”)因为它将nil
返回给两个UIObject。
我在CustomIOS7AlertView
中使用didReceiveLocalNotification:
加载项(There Site),我正在使用该加载项在AlertView中添加UIView,并且它可以工作到地方在应用程序中,但在AppDelegate
它没有用,因为UIObjects返回nil
。
views.xib:
AppDelegate.h:
AppDelegate.m:
#import "AppDelegate.h"
#import "CustomIOS7AlertView.h"
@synthesize window, DateTimeView, pcvDateTime;
- (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification{
CustomIOS7AlertView *DateTimeAlert;
DateTimeAlert = [[CustomIOS7AlertView alloc] init];
pcvDateTime.minimumDate = [NSDate date];
[pcvDateTime setDate:[NSDate date]];
[DateTimeAlert setButtonTitles:[NSMutableArray arrayWithObjects:@"Cancel", @"Set Alarm", nil]];
[DateTimeAlert setContainerView:DateTimeView];
[DateTimeAlert setDelegate:self];
[DateTimeAlert show];
}
%不是完整的代码只是重要的%,这里是问题,AlertView
显示但是它的空体,当我使用断点时它告诉我UIObjects是nil
,任何答案?