There's a shadow on my button

前端 未结 3 1152
既然无缘
既然无缘 2021-01-05 11:10

i\'m creating a button programmaticly for an iPad application. when i see the button, there looks to be a shadow type thing below it. what is it and how can i get rid of it?

3条回答
  •  梦谈多话
    2021-01-05 11:20

    Replace [UIButton buttonWithType:UIButtonTypeRoundedRect] with:

    UIButton *myButton = [UIButton new];
    

    or:

    UIButton *myButton = [UIButton buttonWithType:UIButtonTypeCustom];
    

    You want to have your customized button. You can still make it with rounded corners if needed.

提交回复
热议问题