Objective-C: if (object) Vs. if (object != nil)

Viewed 3424

Assuming object is a kind of NSObject, the following if statements are equivalent, but which style should I use?

if (object) {
    // ...
}

or

if (object != nil) {
    // ...
}
2 Answers
Related