0
我是iOS新手。我有一個警告信息,我可以不能解決它:) 我有以下代碼:將NSArray轉換爲NSSortDescriptor
NSSortDescriptor *sortDescriptorFirst = [NSSortDescriptor sortDescriptorWithKey:@"test" ascending:YES];
NSSortDescriptor *descriptor=[NSArray arrayWithObjects:sortDescriptorFirst,nil];
NSArray *sortedArray =[sections sortedArrayUsingDescriptors:@[descriptor]];
在第2行我有一個警告:
Incompatible pointer types initializing NSSortDescriptor with an expression of NSArray
如何解決這個問題?