티스토리 뷰
나는 위 쪽에 테두리를 추가하고 싶었다.
func addTopBorder(with color: UIColor?, andWidth borderWidth: CGFloat) {
let border = UIView()
border.backgroundColor = color
border.autoresizingMask = [.flexibleWidth, .flexibleBottomMargin]
border.frame = CGRect(x: 0, y: 0, width: inputTextField.frame.width, height: borderWidth)
inputTextField.addSubview(border)
}
이렇게 설정하고
addTopBorder(with: UIColor.black, andWidth: CGFloat(0.5))
를 통해 호출했다.
'Swift' 카테고리의 다른 글
[Swift5] 특수문자 ("/\ 등) String으로 입력하기 (3) | 2020.05.07 |
---|---|
[Swift] this class is not key value coding-compliant for the key heightConstraint. (0) | 2020.04.29 |
[Swift] keyboard 에 따라 화면 동적으로 움직이기 (0) | 2020.04.21 |
[Swift] Table View 구분선 없애기 (0) | 2020.04.16 |
[Swift] UITextField Set Padding (0) | 2020.04.16 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- urlsession 공통화
- loadView viewDidLoad
- codable date
- ios universal framework
- linux java 설치
- User Interface Style
- urlrequest 모듈화
- loadView
- swift delegate
- swift codable
- urlrequest 공통화
- 코르도바 iOS
- Swift 프로젝트에서 Objective-C
- passing data between ViewController and View
- UIUserInterfaceStyle
- Objective-C 프로젝트에서 Swift
- swift json 파싱
- ios framework device simulator
- 코르도바 플러그인
- passing data between ViewControllers
- 코르도바 Swift
- Viewcontroller data
- urlsession 모듈화
- codable
- UITextField 글자수 제한하기
- 코르도바 iOS Framework
- iOS Dark Mode
- RxSwift UITetxtField
- swift json parsing
- swift generic
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
글 보관함