프로그램/iOS

iOs UILabel, UIButton 색상, 폰트, 글자체 변경

잡식성초보 2016. 2. 19. 17:34

//라벨

self.Label.text =@""  //라벨 텍스트 입력


[self.Label setTextColor:UIColorFromRGBA(0x009cff1)];  //라벨 색상입력


[self.Label setFont:[UIFont fontWithName:@"SFUIDisplay-Regular" size:15.0f]];  //폰트  글크기


//버튼

[self.Button setTitle:@"값넣기" forState:UIControlStateNormal];  //버튼 라벨 입력


[self.Button setTitleColor:UIColorFromRGBA(0x005cff1forState:normal];  //버튼 라벨 색상 입력


[self.Button setBackgroundColorUIColorFromRGBA(0xffffff1)];  //버튼 배경색상 입력


[self.Button setTintColorUIColorFromRGBA(0xffffff1)];  //버튼 틴트색상 입력


[self.Button setBackgroundImage:[UIImage imageNamed:@"이미지"forState:UIControlStateNormal];  //버튼 백그라운드 입력


[self.Button.titleLabel setFont:[UIFont fontWithName:@"SFUIDisplay-Bold" size:25.0f]];    //버튼 폰트 및 사이즈


color = UIColorFromRGBA(0x005cff1);  

 [self.eView.layer setBorderColor:[color CGColor]];  //뷰 테두리 색상 입력

 [self.eView.layer setBorderWidth:1.0f];  //뷰 테두리 굵이 입력


[self.Button addTarget:self action:@selector(ClickButton:) forControlEvents:UIControlEventTouchUpInside];  //버튼동적으로 이벤트 넣기

반응형

'프로그램 > iOS' 카테고리의 다른 글

iOS 테이블뷰 사용법  (0) 2016.02.22
iOS 동적 라벨에 따라서 cell 높이 변경  (0) 2016.02.19
iOS UIalertView 사용법  (0) 2016.02.19
iOS 동적 Uiview 생성하기  (0) 2016.02.19
iOS UI 이미지 변경 및 색상 변경  (0) 2016.02.19