开发者

Custom UIButton iphone

I want to change the color of my UIButton. I did this:

UIButton *alreadySubscriber = [[UIButton alloc] initWithFrame:CGRectMake(12, maxy-65, 262.0, 50)];
alreadySubscriber.layer.cornerRadius = 10.0f;
[alreadySubscrib开发者_C百科er setBackgroundColor:[UIColor orangeColor]];
[alreadySubscriber setTitle:@"Already a subscriber" forState:UIControlStateNormal];

The color of the button changes, but no longer see the effect of bright light booby top. how can I fix this?


We're unable to programmatically set this 'bubble effect' for the UIButton I'm afraid. The only way to go about it far as I can tell is to go for a custom button with an image (or two images for the normal and active states).

The resource Eugene put up earlier seems pretty good in fact.


I don't really know what kind of booby light are you talking about, but have you tried using images for your buttons? I'd suggest using two different images like those you can create here http://dabuttonfactory.com/.


You should create as a custom button and add the image/color as background.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜