상세 컨텐츠

본문 제목

Day 5. Functions.

TIL/#100DaysOfSwiftUI

by box-jeon 2019. 12. 26. 12:18

본문

https://www.hackingwithswift.com/100/swiftui/5

 

100 Days of SwiftUI – Day 5 – Hacking with Swift

100 Days of SwiftUI The 100 Days of SwiftUI is a free collection of videos, tutorials, tests, and more to help you learn SwiftUI faster. Click here to learn more, or watch the video below. Back to 100 Days of SwiftUI

www.hackingwithswift.com

새삼스럽지만 기본적인 부분을 차근차근 짚어주는 부분이 좋았던 것 같습니다.

1. function을 사용하면 copying&pasting을 매번 할 필요가 없습니다. 혹시 수정을 하게 된다고 해도 모든 곳에 반영됩니다.
2. function을 매 실행마다 customize할 수 있다면 더욱 powerful할 겁니다. 그래서 parameter가 있죠.
3. function은 데이터를 받기만 하는 것이 아니라 돌려주기도 합니다. return을 써보세요.

 

 

'TIL > #100DaysOfSwiftUI' 카테고리의 다른 글

Day7. Closures, part two.  (0) 2019.12.28
Day 6. Closures, part one.  (0) 2019.12.27
Day 4. Loops.  (0) 2019.12.24
Day 3. Operators and conditions.  (0) 2019.12.23
Day 2. Complex data types.  (0) 2019.12.22

관련글 더보기

댓글 영역