// I need to

ModernizeUpgrade without breaking it RescueFix what someone else started Build NewTurn an idea into a product Reach More PeopleGet found, get used, include everyone

// Company

Case StudiesExpertiseAbout + CareersResourcesContact Book a call →
≡articleBuild New

Beautify Your Objective-C Code

Format Objective-C code exactly how you like it with Uncrustify and UncrustifyX, a GUI that previews each formatting option and saves a config file.

Art+Logic May 29, 20131 min read

From the Art+Logic archive · written in 2013. The tools may have moved on; the thinking still holds.

Uncrustify is an open source code formatting tool for various languages including C, C++ and C#. It can also be used to format Objective-C code.

Uncrustify offers a large number of fine-grained options for code formatting that can be somewhat daunting to set up. The tool I want to mention here is a GUI application written by Ryan Maxwell that provides a neat user interface for setting the options for code formatting for Objective-C code. It is an application called UncrustifyX.

Here is a screenshot of the main window. It is easy to change the setting of an option on the left side and see its effect on the code on the right.

Beautify Your Objective-C Code

Clicking on the Info button for any option shows more detail about that option as shown here.

Beautify Your Objective-C Code

This GUI tool provides a way to define the formatting options exactly as you want. These options can then be saved as a configuration file. The command-line version of uncrustify can then use this configuration file to format source files. There is also an Xcode plugin available that modifies the Edit menu of Xcode to offer options for uncrustify.

Read more about this Xcode formatting tool.

keep going

More to explore in Build New.

All Build New resources →
let's talk

Got a problem like this one?

Tell us what's stuck. A real person replies within one business day.

Talk to our team →

Talk to people who know software, not a sales script.

Your first call is with Aja, our VP of Sales. He'll help make sure you're solving the right problem. Here's what you'll cover together:

  1. What you're trying to accomplish

    The business goal first, then the technology.

  2. Possible approaches

    And the tradeoffs of each, in plain language.

  3. Risks you may not have considered

    Technical and business, before they cost you.

  4. Whether AI changes the math

    What's practical, and what's just hype for your project.

  5. Sensible next steps

    Even if the right next step is not us.

book-a-call.ics

Loading the scheduler…

Open the booking page →

Some problems are easier to explain in writing. Send us a few lines about what you're working on, and we'll reply within one business day. Helpful to include:

  1. What the software does, or should do
  2. What's stuck, or what's worrying you
  3. Any deadline or budget you have in mind
note.md

Loading the form…