Jul 28, 2011

XCode and SVN - Unable to load revisions

Posted Jul 28, 2011
Introduction
There's a weird bug happening in XCode when I add a repository (File -> Source Control -> Repositories...).  I tried other credentials and I'm able to get the revisions, but every time I added mine, I just can't access the SVN even if I supplied the correct username and password. It just keeps telling me "Unable to load revisions"

I even tried removing and adding the repository and account details to no avail.  At first I thought my access was blocked turned out that XCode is using the wrong cache to authenticate itself.


The Solution (or rather workaround)
Go to Terminal and type:
svn checkout [svn_server_path] [local_path] --username [username]

E.g.
svn checkout svn://192.168.0.2/data/master/SVN/PROJ1/trunk/sample ./sampletemp --username mvergel

It will then ask for your password. Supply the correct one and continue to check out the contents.

After this process, your XCode repository should now be okay. If it's not, try to restart XCode.

Jul 20, 2011

How to make UILabel's text bold

Posted Jul 20, 2011
If you want to retain the system font and make it bold:

[myLabel setFont:[UIFont boldSystemFontOfSize:16]];

Jul 19, 2011

Automatic Comment Folding in Eclipse

Posted Jul 19, 2011
A good documentation is important for team development but code comments sometimes consumes a lot of vertical space and obstructs your view.

Fortunately Eclipse has a way to automatically fold or hide them.

Go to Preferences > Java > Editor > Folding

Check the ff:
  • Comments
  • Enable folding (default)
  • Header Comments (default)
  • Imports (default)