开发者

how can i make a button such that user only see the text on it but not the button iphone sdk

how can i make a button such that user only see the text on it but not the button in iphone sdk ? i tried t开发者_如何学Co lower its alpha value but even then it appears a little


If you just don't want to see the rounded rectangle of the button then set the button type to custom.


You can follow this workaround by using a UILabel instead of a UIButton. This does not answer directly to your question, as setting a custom type should and since it does not can you post some code?


Create your button of type UIButtonTypeCustom and add:

[myButton setBackgroundColor: [UIColor clearColor]];


You must use a custom button......

UIButton *custBtn = [UIButton buttonWithType:UIButtonTypeCusttom];
[custBtn setText:@"Sarabjit" forState:UIControlStateNormal];
[self.view addSubView:custBtn];
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜