Jeff.Lu Jeff.Lu - 1 year ago 54
Objective-C Question

How to copy the objective-c method name more effecively in XCode?

I have the method:

- (NSInteger)tableView:(UITableView*)tableView numberOfRowsInSection:(NSInteger)section
return items.count;

What I do now is to copy the whole first line and then remove the words about the formal parameters. Is there a better way to copy the method name so that I can get

Answer Source

This seems not very nice, but you can right-click on method name, then Refactor -> Rename and Cmd+C to copy method name.

For even better access you can set the shortcut for this in Xcode -> Preferences -> Key Bindings -> Rename. That will require one click on method name and two shortcuts for getting signature

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download