Xcode Can’t Ignore UserInterfaceState.xcuserstate

Running version control in Xcode can give some troubles when setting up in an existing project. Having an existing project added to a new Git repository the Xcode keep saying UserInterfaceState.xcuserstate has changes. The working copy “helloworld” has uncommitted changes. Commit or discard the changes and try again. Committing the changes doesn’t help as it keep

Read More

DerivedData for Xcode 4.5

When updating Xcode to 4.5 the DerivedData has disappear it seems. Though it has just been moved to another location. Now it’s at: ~/Library/Developer/Xcode/DerivedData/— You can find the location in Xcode 4.5 by looking at Preferences->Location. This shows where your Derived Data location actually is on the File System.

Xcode Use Image On UINavigationbar

You can set an image to the UINavigationbar in Xcode for iPhone like this: UINavigationBar *navBar = [[self navigationController] navigationBar]; UIImage *backgroundImage = [UIImage imageNamed:@”nav-bar-background-normal”]; [navBar setBackgroundImage:backgroundImage forBarMetrics:UIBarMetricsDefault]; Works from iOS 5 and up.

Xcode background-568h@2x.png Not Working

background-568h@2x.png does not work! This is intended, sadly. It’s worth noting that [UIImage imageNamed:@”background.png”] will still only load either “background.png” or “background@2x.png”, it will not load “background-568h@2x.png” if it exists. To get a background use a proper size for iPhone 5, the infamous 1136×640 you have to change is programmatically. Do this at runtime: CGRect screenBounds

Read More

Xcode Create Git Repository From Existing Project

Creating git repository for you existing xcode project can be done as follow: Use the cdcommand to switch to your project directory, making it the current working directory. Enter git init to create an empty repository. Enter git add . to copy your project files into the repository. Enter git commit -m “Initial commit”to commit all the files. For more details

Read More

Xcode Create SVN Repository From Existing Project

Creating repository for your xcode project can be a pain if you didn’t do it when you first created the project. It is possible with some command-line commands. The steps are as follow: Use the mkdircommand to create a directory with three subdirectories named branches,tags, and trunk to hold a temporary copy of your project. Copy the project directory

Read More