开发者

Change the Round Rect Button to a Rectangular Button with no curved corners in Interface Builder

开发者 https://www.devze.com 2023-02-15 04:06 出处:网络
Hey guys, Need a help in Interface Builder. Usually when yo开发者_StackOverflow社区u insert a button, it\'s settings is a Round Rect Button. How do we change the Round Rect Button into a Rectangular B

Hey guys, Need a help in Interface Builder. Usually when yo开发者_StackOverflow社区u insert a button, it's settings is a Round Rect Button. How do we change the Round Rect Button into a Rectangular Button? Like I don't want the curved corners of the button, just regular pointy corners like a rectangular shape? Hope someone can help me with this easy question, thanks


in xcode 4.5 i use:-

[[myButton layer] setCornerRadius:0.0];
[[myButton layer] setBorderColor:[[UIColor lightGrayColor] CGColor]];
[[myButton layer] setBorderWidth:1];


I believe all you have to do is give it a background in inspector. Or you could assign it an image.

0

精彩评论

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