ESPN

  www.espn.go.com
  www.espn.go.com

Interview Question

Mobile Software Engineer Interview Bristol, CT

Design a block function that returns an array and Bool.

Tags:
technical
Answer

Interview Answer

1 Answer

0

Blocks are a relatively recent introduction (2010?) to the world of Objective C. Like declared functions in most other languages, a block function can only return one "thing" (or object). To get both an array and BOOL out of a block, you can either declare "__block" variables that can be passed in and modified from within the block, or you can return some Objective C object that contains both the array and BOOL.

Interview Candidate on Jan 24, 2013

Add Answers or Comments

To comment on this, Sign In or Sign Up.