300x250 UIButton2 UIButton 버튼의 테두리 설정 buttonName.layer.borderWidth = 1; buttonName.layer.borderColor = [UIColor colorWithRed:(0/255.0f) green:(176/255.0f) blue:(190/255.0f) alpha:1].CGColor; 버튼 타이틀 정렬 버튼명.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter; 버튼 이미지 컬러 버튼의 이미지도 내 맘대로 색상을 지정할 수 있다. 버튼 스타일을 custom으로 지정후 tintColor를 수정해주면 되는데, 만약, 변경이 안된다면 Asset -> 해당 이미지의 attribute inspector -> Render As를 'T.. 2022. 9. 28. UIButton 상태에 따른 속성 적용(storyboard) Button States 부분을 보면 버튼 상태에 따라 다르게 속성을 지정할 수 있다고 한다. 단, 텍스트 또는 이미지에 대한 속성만 state config를 통해 적용이 가능한 것 같다. 버튼 타입을 custom으로 바꾸면 state config 설정 칸이 생기는데 Default일때와 highlighted, selected, Disabled 상태를 선택해서 버튼 state에 따른 속성을 지정해주면 된다. @interface TestViewController () @property (weak, nonatomic) IBOutlet UIButton * btn; @end @implementation TestViewController - (void)viewDidLoad { [super viewDidLoad]; .. 2022. 2. 24. 이전 1 다음 300x250