일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- swift documentation
- UICollectionView
- rxswift
- Observable
- Human interface guide
- collectionview
- uiscrollview
- 스위프트
- map
- swiftUI
- Refactoring
- clean architecture
- HIG
- tableView
- uitableview
- Clean Code
- 애니메이션
- ribs
- Xcode
- 리펙터링
- SWIFT
- combine
- RxCocoa
- ios
- 클린 코드
- Protocol
- 리펙토링
- MVVM
- UITextView
- 리팩토링
- Today
- Total
목록커스텀 버튼 (3)
김종권의 iOS 앱 개발 알아가기
목차) SwiftUI의 기본 - 목차 링크 * Button 기본 개념은 이전 포스팅 글 참고 커스텀 버튼 구현 아이디어 ButtonStyle을 준수하는 struct형을 만들고, makeBody(configuration:) 메소드를 구현 SwiftUI에서는 상속사용을 지양하기 때문에, 사용하는 쪽에서 .buttonStyle()으로 사용 // 커스텀 ScaleButton을 만들기 위해서 ButtonStyle 준수하고 makeBody 메서드 구현 struct ScaleButton: ButtonStyle { func makeBody(configuration: Configuration) -> some View { } } makeBody 인자 configuration은 label 프로퍼티에 접근할수 있는데, 이 l..
Roundable 버튼 layer.cornerRadius값이 width나 height의 값의 반일때 원이 되므로 이 특성을 사용 // ViewController.swift NSLayoutConstraint.activate([ self.circleView.topAnchor.constraint(equalTo: self.view.topAnchor, constant: 120), self.circleView.centerXAnchor.constraint(equalTo: self.view.centerXAnchor), self.circleView.widthAnchor.constraint(equalToConstant: 120), self.circleView.heightAnchor.constraint(equalToCons..
목표 baseButton을 하나 만들고, 공통적으로 baseButton의 속성을 가지면서 각자의 특색있는 커스텀 버튼 생성 BaseButton 생성 cornerRadius가 4인 Base버튼 클래스 생성 // // MyBaseButton.swift // Test // // Created by 김종권 on 2020/11/20. // import Foundation import UIKit class MyBaseButton: UIButton { override init(frame: CGRect) { super.init(frame: frame) setupView() } required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) setupView(..