Thursday, July 29, 2010

Improving your UI and all the control options



Apple has provided a great app called UICatalog that is a demo of all the different controls. This is a standard XCode project you can use to not only see the various controls but also see the code that customizes many of these controls. You can find UICatalog here.

You are also allowed to use what you find in the images folder of this project for your own applications.









I took the blue and white buttons and created a simple project and used the button images they provided.

I am using whiteButton.png and blueButton.png which look like this:

whiteButton.png

blueButton.png


Here is the before (the second button has white text):
Here is the after:

You can also use this for the normal and pressed button states using the same techniques.

Here is the code (IBOutlets for button1 and button2) from the ViewController.

- (void)viewDidLoad {

UIImage *buttonImageNormal = [UIImage imageNamed:@"whiteButton.png"];

UIImage *strechableButtonImageNormal = [buttonImageNormal stretchableImageWithLeftCapWidth:12 topCapHeight:0];

[button1 setBackgroundImage:strechableButtonImageNormal forState:UIControlStateNormal];

buttonImageNormal = [UIImage imageNamed:@"blueButton.png"];

strechableButtonImageNormal = [buttonImageNormal stretchableImageWithLeftCapWidth:12 topCapHeight:0];

[button2 setBackgroundImage:strechableButtonImageNormal forState:UIControlStateNormal];

[super viewDidLoad];

}






Thursday, July 22, 2010

Using TFS with Xcode

After some searching, it seems our options for integrating Xcode with TFS are pretty limited. Currently Xcode does not provide an API or plugin model to support SCM using anything other than CVS or Subversion. Although it seems straightforward to set up a subversion server and connect to it with Xcode, it would of course be ideal for us to integrate with our established TFS environment. The top recommendations for what we are trying to do are Teamprise (standalone UI) and SvnBridge. SvnBridge seems to be our best bet, acting as a layer on top of TFS to make it appear to be a subversion server to Xcode. Although it may not be the ideal solution, it could meet our basic needs.