Question

Just wondering, it seems like it works pretty well but I want to make sure I am using generally accepted coding practices and not get into bad habits.

Thanks,

Nick

Was it helpful?

Solution

Yes, it's good form. It was introduced as the preferred style of enumeration in Objective-C 2.0, in fact. Use it wherever possible.

OTHER TIPS

Fast enumeration is a recent addition to the language, so don't be concerned that you're not seeing it much in other people's code. It takes a while for people to adopt new habits.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top