當數組為空時遍歷數組容易出這樣的問題, -[NSNull countByEnumeratingWithState:objects:count:]: unrecognized selector sent to instance 0x3e4e85e0
解決辦法就是在遍歷數組之前先要判斷
if (![array isKindOfClass:[NSNull class]])
{
for循環
}