전체 글
-
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] Swift and Foundation- Tuples, Range, Data StructureStanford iOS Lecture 2020. 4. 13. 23:48
# Tuples What is a Tuple? 스위프트의 타입 중 하나 서로 다른 타입들을 그룹으로 묶어서 하나의 타입을 만든다. 타입이 들어갈 자리라면 어디든지 튜플을 사용할 수 있다. (You can use it anywhere you can use a type.) # Range 무엇이든 연속적으로 표현할 수 있는 것의 양 끝 점을 가르킨다. Warning: A String subrange is not Range ( It is Range … we’ll talk later! ) … 과 ..
-
[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 컨트롤러가 화면에 무언가를 보여줄 때 사용 # 캠프 간의 소통 컨트롤러는 모델을 통제 모델은 앱을 설계하는 쪽에 가까움 모델을 설계하려면 앱이 근본적으로 무엇을 하는지 생각 사용자에게 어떻게 보여질..
-
[Stanford Lecture] What is iOS ?Stanford iOS Lecture 2020. 4. 13. 22:50
iOS에뭐가 있는지? 4개의 계층 (1번으로 갈수록 하드웨어에 가깝고, 4번으로 갈 수록 사용자에 가깝다) Core OS 아이폰은 기본적으로 UNIX기반에서 동작 중요한 전원관리전원 관리,접근을 제어하는 keychain access Core Services Unix 위에는 객체지향언어로 작성된 계층이 있음 베이스가 되는 계층 Media Cocoa Touch Top layer #Tool - Xcode, Instruments #Language - Swift #Frameworks - Foundation, UIKit,... #Design Strategy - Mvc