Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. NSArray *array;
  2. [array objectAtIndex:0]; // <- Will throw an error
  3.  
  4. RecordingLocation* closest;
  5.  
  6. //find the closest recording location
  7. for (...)
  8. {
  9. //try to find the closest object...
  10. //suppose we don't find anything so closest is never set.
  11. }
  12.  
  13. if (closest!=nil)
  14. NSLog(@"Closest: %f,%f",closest.x,closest.y);
  15.  
  16. NSArray *arr = [NSArray arrayWithObjects:@"@dog","@cat",nil];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement