Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode Tips for Eclipse users?

I've been slowly working my way through the examples in Beginning iPhone Development and there are a few things that I have not been able to figure out, but I'm sure you guys can help me with it.

  • In Eclipse there is a Source->Generate Getters/Setters, can you do something similar to synthesize properties in Xcode
  • I also cannot seem to find a Refactor menu
  • I'm also struggling to find the equivalent to Source->Override/Implement Methods

--Edit-- I failed to describe my problem it seems. I do know that synthesizing properties will generate getters/setters for me, but I am looking for a way to generate the @property/@synthesize code, by selecting the variables.

Short list to start with, but I will probably have more as my confusion grows in might.

like image 951
willcodejavaforfood Avatar asked Jan 25 '10 13:01

willcodejavaforfood


4 Answers

I will ignore that question and instead answer a different question:

Here is some stuff I found useful when I first got started

  • Keyboard Shortcuts
  • Custom Macros

And to directly address your question, check out Accessorizer

like image 184
slf Avatar answered Oct 30 '22 11:10

slf


I've created a list about a lot of funcrions and features in Xcode which also contains a lot of features that you are used to in Eclipse (i'm using eclipse on a daily basis) which also include thins like displaying class hierarchy, search for classes, code completion, using Xcode with svn etc..

Xcode tips: http://www.sodeso.nl/?p=674

Using Xcode with svn: sodeso.nl/?p=599

like image 22
ronaldmathies Avatar answered Oct 30 '22 11:10

ronaldmathies


There's no way built in Xcode to make proprieties in an automated manner.

However, user script can do this. Take a look at this article by Matt Gallagher.

like image 22
gcamp Avatar answered Oct 30 '22 11:10

gcamp


In Eclipse there is a Source->Generate Getters/Setters, can you do something similar to synthesize properties in Xcode

AFAIK there isn't such a thing in Xcode. But synthesizing ObjC properties is simple, just add

@property(retain) NSArray* my_array;

in your @interface and

@synthesize my_array;

in your @implementation, if you want to generate getters and setters for my_array.

I also cannot seem to find a Refactor menu

Edit -> Refactor (Shift-Cmd-J).

If you simply want to rename, mouse-click an identifier, wait for 1 seconds for a downward triangle to appear next to it, then click on it and choose "Edit All in Scope".

like image 29
kennytm Avatar answered Oct 30 '22 13:10

kennytm