Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an easy way to autocomplete block variables in xcode?

Tags:

Usually Xcode autocomplete works really well for me but when tabbing through method signatures with blocks and block variables I always have to retype the variable types and names. Here's an example:

block variable without autocomplete

The animation block is easy to complete since it has no block variables and thus I only have to type ^{} before I can start writing code. With the second completion block I have to type out ^(BOOL fin){} before I can start writing code. This example is somewhat simplistic but with multiple types where some of the names are longer (such as AFHTTPRequestOperation) it becomes a pain and it feels like a situation where Xcode would otherwise autocomplete.

Am I missing some trick for autocompleting these block variables or am I stuck retyping them every time?

like image 716
Nick Avatar asked May 04 '12 19:05

Nick


1 Answers

Tab until the entire block section is highlighted. Rather than typing, just hit return and the example block will be expanded.

like image 142
Sean Avatar answered Sep 24 '22 15:09

Sean