如何從NSMutableArray獲取最大值。值是作爲存儲在NSString的陣列如下面從NSMutableArray獲取最大值
for(int counter=0; counter<[datesArray count];counter++)
{
glass = [NSString stringWithFormat:@"%f",[[dbhandler todayData:currentDate] floatValue]];
[graphGlassesArray addObject:glass];
}
陣列名稱是graphGlassesArray
。
您是否嘗試循環並將迄今爲止遇到的最大值存儲在變量中? – APerson 2014-10-01 12:56:16