0
가능한 중복 : 내가하는 구형 또는 원형있는 UIButton을 만드는 방법에 대해 사례를 발견
Simple way of using irregular shaped buttons특정 모양으로 UIButton을 만듭니다. 어떻게?
.
특정 모양 (예 : 심장, 별 등)의 UIButton을 만들 수 있습니까?
어떻게?
UIButton *myButton=[UIButton buttonWithType:UIButtonTypeCustom];
[myButton setFrame:CRectMake(0, 0, imWidth, imHeight)];
[myButton setBackgroundImage:[UIImage imageNamed:@"shabadabada.png"] forState:UIControlStateNormal];
을 그리고 그것이 실제로 "shabadabada"모양은 아니지만 그 ... 당신에게 간단한 버튼을 얻을 것입니다 :