Archive for August, 2010

Change the company name in template files

Paste this into the Terminal application:

defaults write PBXCustomTemplateMacroDefinitions '{"ORGANIZATIONNAME" = "Super Developers Inc.";}'

Then restart Xcode.

Categories: iOS, Xcode

Turn off the “You are about to undo past the last point this file was saved.” warning

August 31, 2010 1 comment

When you attempt to undo after saving, you will get the following prompt:

“You are about to undo past the last point this file was saved. Do you want to do this?”

To get rid of this warning, enter the following into a terminal window:

defaults write XCShowUndoPastSaveWarning NO

Then restart Xcode.

Categories: Xcode

Xcode plug-ins


Simply move the product (`pluginName.pbplugin`) to `~/Library/Application Support/Developer/Shared/Xcode/Plug-ins` (create the directory if necessary).

Then restart Xcode.


  • Xcode auto assistant: When editing an Objective-C file, the completion popup list will be triggered automatically as you type alphanumeric characters. Download the plugin in here.
Categories: Xcode

UINavigationBar Color of More Tab

A “More” tab will automatically created when adding more than 5 view controllers to a UITabBarController. The tab includes a view controller and even a modal view for letting the user edit the app’s tabs in the order they want.

The moreNavigationController and the modal view (edit) are colored with the Default blue. Change the color of the moreNavigationController:

tabBarController.moreNavigationController.navigationBar.tintColor = [UIColor orangeColor];

You can also use the barStyle property if you like:

tabBarController.moreNavigationController.navigationBar.barStyle = UIBarStyleBlackOpaque;

Change the color of the Navigation bar for the modal view of “Edit”:

First, if you haven’t already, make sure your AppDelegate implements the UITabBarControllerDelegate. Then add the optional delegate method willBeginCustomizingViewControllers: in your AppDelegate’s implementation file, and add the following lines of code:

– (void)tabBarController:(UITabBarController *)controller willBeginCustomizingViewControllers:(NSArray *)viewControllers {
UIView *editView = [controller.view.subviews objectAtIndex:1];
editView.backgroundColor = [UIColor grayColor];
UINavigationBar *modalNavBar = [editView.subviews objectAtIndex:0];
modalNavBar.tintColor = [UIColor orangeColor];
modalNavBar.topItem.title = @”Edit Tabs”;

Again, it’s possible to set the barStyle property instead of the tintColor, but barStyle won’t give you all the colour options, of course.

Categories: CodeSnippets, iOS

Trash folder of user

The trash can be found under:

You can use shift+cmd+g and type in the path directly.

Categories: Mac OS X