TIL_220803

애드·2022년 8월 8일

TIL

목록 보기
16/26

버튼 이미지와 타이틀 동시에 넣고 거리조절 하기

button.setTitle("test", for: .normal)
button.setImage(UIImage.init(named: "icon"), for: .normal)

button.imageEdgeInsets = .init(top: 0, left: 0, bottom: 0, right: 0)

UIButtonConfiguration
https://gyuios.tistory.com/126

textfield right view
http://mtsparrow.blogspot.com/2016/01/uitextfield.html

custom view1을 상속해서 또다른 custom view2를 만들려고 하면 상속한 뷰의 frame를 따른다. 그때, view1 아래 혹은 위에 view2의 오브젝트를 추가하려고 하면 아래와 같이 프레임에서 벗어나서 만들어지기 때문에 상속하고자 하는 뷰 보다 더 큰 뷰를 만들어야 할 때는 상속을 하지 말자.


8자리 이상의 영어 숫자 특수문자 regex
-> "^[a-zA-Z\d`~!@#$%^&*()-_=+]{8,}$"
https://whitepro.tistory.com/245

profile
2차전직 개발자가 되자

0개의 댓글