Denny Lee
Denny Lee

Reputation: 23

How to create a customized rounded UiView and UIButton like MobilePASS?

I want to create a similar UIView with rounded corner and UIButton just like this app. Can I implement this on Interface Builder?

enter image description here

Upvotes: 2

Views: 1217

Answers (2)

Ariel
Ariel

Reputation: 2440

Take a look at this tutorial by Ray Wenderlich.

Upvotes: 1

jerrylroberts
jerrylroberts

Reputation: 3454

You can round the corners and set a border in code, just make sure you have QuartzCore framework included.

-(void) viewDidLoad {
    [super viewDidLoad];

    self.welcomeView.layer.cornerRadius = 5;
    self.welcomeView.layer.borderWidth = 2;
    self.welcomeView.layer.borderColor = [[UIColor whiteColor] CGColor];

}

Then just lay out your views and setup your outlets in IB. That should get you going, lots of cool stuff in Quartz.

Here is a link to the API reference http://developer.apple.com/library/mac/ipad/#documentation/graphicsimaging/reference/CALayer_class/Introduction/Introduction.html%23//apple_ref/doc/uid/TP40004500

Upvotes: 3

Related Questions