Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Xcode support regions?

Does Xcode support anything akin to Visual Studio style #region directives for arbitrary code folding?

like image 938
iano Avatar asked Nov 13 '08 22:11

iano


People also ask

Is Xcode localized?

In Xcode, localization refers specifically to the set of resources for a specific language and region that you support. You add a localization to your project and select the resources you want to include for that language and region.

How do I use localization in Xcode?

Open Info tab, and click “+” button under Localizations section. Then choose a language you want to support from the dropdown list shown. XCode opens a dialog showing resources to be added for the new language.

What languages does Xcode support?

Xcode supports source code for the programming languages: C, C++, Objective-C, Objective-C++, Java, AppleScript, Python, Ruby, ResEdit (Rez), and Swift, with a variety of programming models, including but not limited to Cocoa, Carbon, and Java.

Does Apple use localization?

Apple offers localized products, marketing info and services to over 100 separate counties around the globe. Further local telephone numbers are presented in the header on every page and live chat options are presented in most languages during the checkout process.


1 Answers

No, you can only fold code on various defined scoping levels in Xcode.

You can use little tricks to make navigating via the function menu easier, though.

#pragma mark 

Allows you to create a grouping where the label following mark will show up in the function menu. If the label is a hyphen, a separator is inserted into the function menu.

Also, the following labels in comments will show up in the function menu:

// MARK: // TODO: // FIXME: // !!!: // ???: 

Obviously since #pragma mark is not really portable, if you're building a portable application and need it to work with a compiler that doesn't just ignore #pragma directives that it doesn't understand, the comment-style mark is a decent alternative.

like image 170
Jason Coco Avatar answered Oct 09 '22 01:10

Jason Coco