UIObjects在AppDelegate中返回nil

时间:2014-08-26 06:12:49

标签: ios objective-c iphone uiview appdelegate

我使用UIView(命名为“DateTimeView”)& UIDatePicker中的AppDelegate(名为“pcvDateTime”)因为它将nil返回给两个UIObject。

我在CustomIOS7AlertView中使用didReceiveLocalNotification:加载项(There Site),我正在使用该加载项在AlertView中添加UIView,并且它可以工作到地方在应用程序中,但在AppDelegate它没有用,因为UIObjects返回nil

views.xib:

enter image description here

AppDelegate.h:

enter image description here

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,任何答案?

0 个答案:

没有答案