私はここや他の場所で同様の質問をしてきましたが、まだ問題を解決できないようです。ココア - 日付の比較、警告の引き渡しの引数の1つ '特有の目的のCタイプからの比較:'
私は、配列内の可変ディクショナリに格納されている日付が2つの他の日付の間にあるかどうかを調べようとしています。警告を生成するコードの一部である:それは関連するかもしれないように、次のように
if ([[[records objectAtIndex:(i)] objectForKey:@"Date"] compare:userStartDate] == NSOrderedDescending && [[[records objectAtIndex:(i)] objectForKey:@"Date"] compare:userEndDate] == NSOrderedAscending) {
、userStartDateが作成されている:
:によってコードの他の部分から呼び出され- (id)initWithArray:(NSMutableArray *)newRecords andWithUserStartDate:(NSDate *)newUserStartDate andWithUserEndDate:(NSDate *)newUserEndDate {
if (self = [super init]) {
[self setRecords:newRecords];
[self setUserStartDate:newUserStartDate];
[self setUserEndDate:newUserEndDate];
}
return self;
}
summariser = [[Summariser alloc]initWithArray:records andWithUserStartDate:[userTimesStartDatePicker dateValue] andWithUserEndDate:[userTimesEndDatePicker dateValue]];
レコード自体は次のようになります。
[record setObject:[datePicker dateValue] forKey:@"Date"];
私はこれがはっきりしており、誰かが助けてくれることを願っています。
おかげ
'userStartDate'の宣言を表示できますか? –