- (id)initWithCoder:(NSCoder *)aDecoder
{
dueDate = [NSDate date];
}
- (void)viewDidLoad
{
[super viewDidLoad];
NSDateFormatter *formatter = [[[NSDateFormatter alloc] init] autorelease];
[formatter setDateStyle:NSDateFormatterShortStyle];
[formatter setTimeStyle:NSDateFormatterShortStyle];
self.lbDueDate.text = [formatter stringFromDate:dueDate];
}
在 init 方法中我声明了dueDate = [NSDate date]。但是当我调试时,在这一行
self.lbDueDate.text = [formatter stringFromDate:dueDate];
并输出: (NSDate *) dueDate = 0x0c497390 那么发生了什么?