應用獲取的Mutable數組如下:
MutableArray1:(
"22.298166 , 73.165809",
"22.300598 , 73.167183",
"22.298101 , 73.166188",
"22.298128 , 73.166194"
"22.298130 , 73.166194"
)
我想要用array1中的最後三個數據比較數據為22.298130 , 73.166194
的NSString,怎麼樣能實現?
謝謝
if([Array1 count]>3)
{
for (int i = [Array1 count] - 4; i < [Array1 count]; i++) {
if ([[Array1 objectAtIndex:i] isEqualToString:@"22.298130 , 73.166194"]) {
NSLog (@"True");
//自定義代碼
}
}
}