IOS
-
iOS ScrollView SampleiOS 2020. 5. 8. 00:45
iOS 앱을 만들어보면서 제일 먼저 막혔던 부분이다. 앱을 켜서 메인화면을 들어갔을 때, 위아래로 화면을 터치할 경우 화면이 스크롤되는 기능. 이게 사용할 때에는 몰랐는데 막상 만들려고 하니 간단한 일이 아니였다. 여러 가지 UI 뷰 컴포넌트(UIView, ScrollView, Label, Image, … )에 대한 이해도 필요하고, 화면을 구성할 때 AutoLayout에 대한 이해와 경험도 필요했다. 블로그나 유튜브 예제나 강의를 찾아서 해보면 그때는 어떻게든 되긴 하지만… 만들고서도 이건 내 것이 아니라는 생각이 절로 든다. 내가 잘 모르고 만든 것이라서 그렇다. 아무튼 애플이 만든 생태계에 적응을 하기로 마음을 먹었으니, 긍정적인 마음을 가지고 도전을 해본다. #1 스토리보드에서 아래와 같이 구성 ..
-
[Stanford Lecture] Method & PropertyStanford iOS Lecture 2020. 4. 14. 12:58
# Parameters names All parameters to all functions have an internal name and an external name The internal name is the name of the local variable you use inside the method The external name is what callers use when they call the method 외부이름을 사용하지 않으려면 언더바(_)를 넣어줄 수도 있음. You can put _ if you don’t want callers to use an external name at all for a given parameter This is the default for the first ..
-
[Stanford Lecture] MVCStanford iOS Lecture 2020. 4. 13. 23:37
# What is MVC design pattern ? Divide objects in your program into 3 “camps”. model = What your application is (but not how it is displayed)어떻게 보여주는지가 아니라 그냥 무엇인지를 알려줌 controller = How your Model is presented to the user (UI logic) 모델이 스크린에 어떻게 표현되는지 알려줌 view = Your Controller’s minions 컨트롤러가 화면에 무언가를 보여줄 때 사용 # 캠프 간의 소통 컨트롤러는 모델을 통제 모델은 앱을 설계하는 쪽에 가까움 모델을 설계하려면 앱이 근본적으로 무엇을 하는지 생각 사용자에게 어떻게 보여질..