3 ms·
I find it far more convenient to type something like NSArray *a = [self somethingThatProducesAnArray]; if (a.count > 0) { // do something }
by aaronbrethorst 13y ago
I find it far more convenient to type something like
NSArray *a = [self somethingThatProducesAnArray];
if (a.count > 0) {
// do something
}
else {
// do something else
}
than
NSArray *a = [self somethingThatProducesAnArray];
if (a && a.count > 0) {
// do something
}
else {
// do something else
}