프로그래밍 방식으로 버튼을 만들고 있는데,이 버튼의 UIButtonType을 설정하는 방법을 알고 싶습니다. 내 버튼을 만드는 오전 방법 버튼 유형 설정
이
은 다음과 같습니다headerPlusButon.buttonType = UIButtonType.ContactAdd
: 당신이 제목의 텍스트를 변경 것이라고 분명히 문제가 해결되지 않는 방법 같은 더 "setButtonTypeFor ..."방법이 없습니다
let headerPlusButon:UIButton = UIButton(frame: CGRectMake(5, tableView.frame.width - 30, 20, 20))
headerPlusButon.addTarget(self, action: "paymentAddButtonTapped", forControlEvents:.TouchUpInside)
단추 유형을 만든 후에는 설정할 수 없습니다. 버튼을 만들 때 싫어한다. – Crazyrems
좋아, Abhishek Sharma가 해결책을 갖게했다. UIButton으로 버튼 = UIButton.buttonWithType (UIButtonType.System)을 사용한다. –