为这三个陈述获取7条警告信息:
// And grab those date components for the same date
hijriComponents = [hijriCalendar components:(NSDayCalendarUnit |
NSMonthCalendarUnit |
NSYearCalendarUnit)
fromDate:[NSDate date]
];
[dateFormat setDateFormat:@"d/M/yyyy"];
NSDate *dateee = [dateFormat dateFromString:dateStr];
self.gDayLabel.text = [NSString stringWithFormat: @"%ld", (long)[gregorianComponents day]];
self.gMonthLabel.text = [NSString stringWithFormat: @"%ld", (long)[gregorianComponents month]];
self.gYearLabel.text = [NSString stringWithFormat: @"%ld", (long)[gregorianComponents year]];
答案 0 :(得分:0)
检查XYZViewController.h文件。 dateFormat在那里被声明为属性。然后在该方法中它还有一个具有相同名称的局部变量。重命名局部变量或使用全局变量。 - Midhun MP 6分钟前