Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- MVVM
- Protocol
- 애니메이션
- 스위프트
- ribs
- HIG
- 리펙토링
- 클린 코드
- map
- swiftUI
- swift documentation
- 리팩토링
- Xcode
- combine
- Human interface guide
- RxCocoa
- scrollview
- clean architecture
- tableView
- collectionview
- SWIFT
- Clean Code
- uitableview
- rxswift
- Refactoring
- uiscrollview
- UICollectionView
- ios
- Observable
- UITextView
Archives
- Today
- Total
김종권의 iOS 앱 개발 알아가기
[iOS - swift] StackView 내부 view간의 spacing 설정 방법 본문
spacing 설정 방법
- 균등한 경우 - storyboard에서 설정

- "스택뷰 안 데이터1"과 "스택뷰 안 데이터2"사이의 간격을 30으로 하고 싶은 경우 -> stackView.setCustomSpacing(_:after) 함수 사용
- @IBoutlet 준비: 스택뷰와 데이터1

- space 설정
func setupView() {
stackView.setCustomSpacing(30, after: lbl1)
}
결과화면
- 데이터1과 데이터2 사이 간격이 30인 것 확인

'iOS 응용 (swift)' 카테고리의 다른 글
[iOS - swift] enum Equatable 비교 연산자 만드는 방법 (0) | 2021.02.23 |
---|---|
[iOS - swift] 내부 크기에 따라 동적으로 width 길이가 증가하는 뷰 (0) | 2021.02.19 |
[iOS - swift] 토스트 메세지 (toast message), 글자에 따른 toast view width 동적 조절, 문자열 크기 동적 계산 (0) | 2021.02.19 |
[iOS - swift] tableView 스크롤바 표출 flashScrollIndicators() (0) | 2021.02.18 |
[iOS - swift] 시간 정보 format (시, 분, 초) (0) | 2021.02.09 |