- Today
- Total
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
- Python
- grep
- r
- swiftUI
- sigmoid
- MVC
- 시각화
- substr
- Linux
- Upper
- ios
- decode
- struct
- scheduledTimer
- tapply
- NVL
- 명령어
- trunc
- 연산자
- delegate
- SWIFT
- Optional
- SQL
- 딥러닝
- cocoapods
- barplot
- Observable
- rxswift
- ReLU
- deeplearning
목록closure (2)
iOS 개발 기록 블로그
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/cONvf1/btrFoOGgv6V/kuM8MTKuhEz5x2RqJ1wjo1/img.png)
일반적인 함수의 형태는 아래와 같다. func functionName (param1: dataType, param2: dataType) -> dataType { return output } 특정 데이터가 입력되어 함수를 통과하면 데이터가 출력된다. 이 입력된 데이터들을 또 다른 함수를 통과하도록 할 수 있다. import UIKit import Foundation func calculator(n1: Int, n2: Int, operation: (Int, Int) -> Int) -> Int{ return operation(n1, n2) } func add(n1: Int, n2: Int) -> Int{ return n1 + n2 } print(calculator(n1: 2, n2: 3, operation: ..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/7anxK/btrFkZBIGUW/KnHLmqiUucnoWJtz2KWDlK/img.png)
오픈 API를 사용하여 데이터를 받는 것을 Networking이라고 한다. 우리의 APP은 API를 통해 Web Server에 데이터를 요청한다. 우리가 필요한 데이터를 쿼리(Query)를 통해 요청(Request)한다. 웹 서버는 이 쿼리를 해석하고 필요로 하는 데이터를 보내준다. 이를 Response라고 한다. 이러한 일련의 프로세스를 'Networking'이라고 한다. Networking의 단계 Create a URL Create a URLSession Give URLSession a task Start the task WeatherManager.swift 파일 struct WeatherManager { let weatherURL = "https://api.openweathermap.org/data..