버튼 모서리를 둥글게하는 방법
직사각형 이미지 (jpg)가 있고 xcode에서 모서리가 둥근 버튼의 배경을 채우는 데 사용하고 싶습니다. 나는 다음과 같이 썼다. UIButton *button = [[UIButton buttonWithType:UIButtonTypeRoundedRect] retain]; CGRect frame = CGRectMake(x, y, cardWidth, cardHeight); button.frame = frame; [button setBackgroundImage:backImage forState:UIControlStateNormal]; 그러나 그 접근법으로 얻은 버튼에는 모서리가 둥글 지 않습니다. 대신 원래 이미지와 똑같이 보이는 …