自定义写UIbutton和uitextfield时rect type

来源:互联网 发布:重庆专升本网络课程 编辑:程序博客网 时间:2024/06/07 00:32

As pheelicks said for UIButton can create it with type UIButtonTypeCustom.

For UITextField set its border style to UITextBorderStyleNone.

    UIButton* button=[UIButtonbuttonWithType:UIButtonTypeRoundedRect];


UITextField* text1=[[UITextFieldalloc] initWithFrame:CGRectMake(120,10, 200, 30)];

    text1.borderStyle=UITextBorderStyleRoundedRect;




原创粉丝点击