Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode - Using #pragma mark

Tags:

I'm pretty sure this isn't a duplicate. Do you use #pragma mark? I've seen multiple ways, which is correct?

#pragma mark - #pragma mark === Actions === #pragma mark -  #pragma mark - #pragma mark === Actions ===  #pragma mark - === Actions ===  #pragma mark Actions 

What is the way you do it? How do you suggest dividing it up? What do you normally name your sections, for say, a view controller?

like image 304
mk12 Avatar asked Aug 05 '09 02:08

mk12


People also ask

Is Xcode easy to use?

Xcode contains lots of great tools that help streamline the development process, making it easy for experienced developers to push apps out quickly. But it's also a user-friendly IDE, so the learning curve isn't as steep for beginners. This is the only official way to create apps by Apple.

Why Xcode is used in Mac?

Xcode is a complete developer toolset for creating apps for Mac, iPhone, iPad, Apple Watch, and Apple TV. Xcode brings user interface design, coding, testing, debugging, and submitting to the App Store into a unified workflow.

How do I use Xcode on my iPhone?

Open up a project in Xcode and click on the device near the Run ▶ button at the top left of your Xcode screen. Plug your iPhone into your computer. You can select your device from the top of the list. Unlock your device and (⌘R) run the application.


1 Answers

There is no "Correct" way, it is annotation, so how you use it is a coding style issue.

Having said that, I do:

#pragma mark - #pragma mark Actions 

Because that causes the popup menu in the Xcode editor group the title and the methods inside of the same divider.

like image 97
Louis Gerbarg Avatar answered Sep 21 '22 07:09

Louis Gerbarg