User Tools

Site Tools


ios-labs-s14:class-05

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ios-labs-s14:class-05 [2014/02/17 13:03]
mbarboi
ios-labs-s14:class-05 [2014/02/17 13:03]
mbarboi
Line 46: Line 46:
 You could make a second method and copy over the code from //​downloadGrants//​. The shorter, cleaner approach would be to edit the method, adding parameters to change the type of the API call, branching conditionally based on the type before the call and the type after the call (i.e. you'll have to check what **kind** of API call you will issue AND what **kind** was returned in the completion block, see below for details). You should use an NSMutableArray as an instance variable to store the names, //using objectAtIndex:​0//​ and //​removeObjectAtIndex:​0//​ to retrieve and dequeue objects. You'll have to recursively call //​downloadGrants//​ at the end of the completion block (unless you're terribly clever.) You could make a second method and copy over the code from //​downloadGrants//​. The shorter, cleaner approach would be to edit the method, adding parameters to change the type of the API call, branching conditionally based on the type before the call and the type after the call (i.e. you'll have to check what **kind** of API call you will issue AND what **kind** was returned in the completion block, see below for details). You should use an NSMutableArray as an instance variable to store the names, //using objectAtIndex:​0//​ and //​removeObjectAtIndex:​0//​ to retrieve and dequeue objects. You'll have to recursively call //​downloadGrants//​ at the end of the completion block (unless you're terribly clever.)
  
-The implementation details are left to you. Creating another method should run you about 20 lines total changes; modifying //​downloadGrants//​ will require about 6 lines of code in total changes.+The implementation details are left to you. Creating another method should run you about 20 lines total changes ​(most of which is just a copy/paste); modifying //​downloadGrants//​ will require about 6 lines of code in total changes.
  
 ===Checking API Call Return Type=== ===Checking API Call Return Type===
Line 57: Line 57:
  
 On the next and final lecture we will put the "​Graphic"​ in Graphic Grant Tracker-- graphs, animations, and more. On the next and final lecture we will put the "​Graphic"​ in Graphic Grant Tracker-- graphs, animations, and more.
- 
-{{ ios-labs-s14:​4_4.png }} 
ios-labs-s14/class-05.txt ยท Last modified: 2014/02/17 13:03 by mbarboi