Search

Rounded Corner 에 테두리 넣기

부제
카테고리
SwiftUI
세부 카테고리
커스터마이징
Combine 카테고리
최종편집일
2022/09/20 08:17
작성중
관련된 포스팅
생성 일시
2022/07/16 15:56
태그

.overlay()

Layers the views that you specify in front of this view.
특별히 지정해주지 않으면 기존 뷰와 같은 크기를 가짐

파라미터

alignment
암묵적인 ZStack 상에서의 위치를 사용하는 모디파이어.
기본값은 center
//RoundedCorner를 가진 뷰 .overlay( RoundedRectangle(cornerRadius: 10) .stroke(Color("AccentColor"), lineWidth: 2.5) )
Swift
복사

stroke

Returns a new shape that is a stroked copy of self with line-width defined by lineWidth and all other properties of StrokeStyle having their default values.
기존 뷰를 카피해 테두리로만 이루어진 뷰를 리턴함.

파라미터

lineWidth
외곽선의 모양, 컬러, 그래디언트등을 설정가능
style : StrokeStyle
외곽선의 모양, 컬러, 그래디언트등을 설정가능