Changes

Jump to: navigation, search

Objective-C Looping - The for Statement

23 bytes added, 19:59, 31 March 2011
Breaking Out of a for Loop
== Breaking Out of a for Loop ==
<google>IOSBOX</google>
Having created a loop it is possible that under certain conditions you might want to break out of the loop before the completion criteria have been met (particularly if you have created an infinite loop). One such example might involve continually checking for activity on a network socket. Once activity has been detected it will be necessary to break out of the monitoring loop and perform some other task.

Navigation menu