Programming Practice: Pragma Mark
May. 29th, 2010 12:28 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
http://cocoasamurai.blogspot.com/2006/09/tip-pragma-mark-organizing-your-source.html explains it better than I can, but this is one of the little things that I've stumbled across in sample code.
Basically, by using
#pragma mark -
(which will give you a blank line)
and
#pragma mark whatever
it means that your editor will contain a list under @ implementation MyClass listing all your methods. It's a way to organise code and make it easier to jump to methods. I can see a strong case for getting into the habit straight from the start.
Basically, by using
#pragma mark -
(which will give you a blank line)
and
#pragma mark whatever
it means that your editor will contain a list under @ implementation MyClass listing all your methods. It's a way to organise code and make it easier to jump to methods. I can see a strong case for getting into the habit straight from the start.