macOS, iOS
image 크기 바꾸기 - scaling, positioning, redrawing
SweetDev
2019. 7. 3. 14:05
scaling
- scale to fill
: 비율 깨지지만 parent에 맞게 꽉 채움.
- scale aspect fit
: 비율 지켜서 채우므로 여백이 생길 수 있음.
- scale aspect fill
: 꽉 채우는데 새어나올 수 있음. 원하지 않으면 .clipsToBound = false 하면 안잘림
positioning -> 위치만 바꿔 줌
- center
- top
- bottom
- left
- right
- top left
- top right
- bottom left
- bottom right
redrawing
용도: 화면을 다시 그리게 해 쥼. 그래야 어플에 반영이 되니까.
- redraw