[iOS/Swift] Image ๋‹คํฌ๋ชจ๋“œ ๋Œ€์‘ํ•˜๊ธฐ
ยท
iOS/Swift
์•ˆ๋…•ํ•˜์„ธ์š” :D ๋ง๊ณ ์ž…๋‹ˆ๋‹ค๐Ÿฅญ ์˜ค๋Š˜์€ ์ด๋ฏธ์ง€๋ฅผ ๋‹คํฌ๋ชจ๋“œ๋กœ ๋Œ€์‘ํ•˜๋Š” ๋ฐฉ๋ฒ•์„ ์•Œ์•„๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ์ธ์ŠคํŒฉํ„ฐ ์ฐฝ์˜ Apperances์—์„œ ์‚ฌ์šฉํ•˜๊ณ  ์‹ถ์€ ์˜ต์…˜์„ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค. ๊ทธ๋Ÿฌ๋ฉด Dark๋ชจ๋“œ์ผ ๋•Œ ์‚ฌ์šฉ ํ•  ์ด๋ฏธ์ง€๋ฅผ ๋„ฃ์„ ์นธ์ด ์ƒ๊น๋‹ˆ๋‹ค. ์—ฌ๊ธฐ์— ์ด๋ฏธ์ง€๋ฅผ ๋„ฃ์œผ๋ฉด ์ž๋™์œผ๋กœ ์ ์šฉ๋ฉ๋‹ˆ๋‹ค!
[Swift] UI ๊ตฌํ˜„ ์‹œ Storyboard์™€ Code Base ๋น„๊ต
ยท
iOS/Swift
Storyboard์˜ ์žฅ์  - ์•ฑ์˜ ํ๋ฆ„์„ ์ง๊ด€์ ์œผ๋กœ ๋ณผ ์ˆ˜ ์žˆ๋‹ค. - ์•ฑ์˜ ๊ฒฐ๊ณผ๋ฌผ์„ ์˜ˆ์ธกํ•˜๊ธฐ ์‰ฝ๋‹ค. - pop, push, present, dismiss๋ฅผ ๊ฐ„๋‹จํ•˜๊ฒŒ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋‹ค. Storyboard์˜ ๋‹จ์  - ํ™”๋ฉด ๋กœ๋”ฉ ์‹œ ๋ฌด๊ฒ๋‹ค. - IBOutlet, IBAction๊ณผ ๊ฐ™์€ ๋งํฌ๊ฐ€ ๋Š์–ด์กŒ์„ ๋•Œ ํŒŒ์•…ํ•˜๊ธฐ ํž˜๋“ค๋‹ค. - ์•ฑ์ด ์ปค์ง€๋ฉด ์ปค์งˆ์ˆ˜๋ก ๊ฐ€๋…์„ฑ์ด ๋–จ์–ด์ง„๋‹ค. - ์ถฉ๋Œ ์‹œ ํ•ด๊ฒฐ์ด ์–ด๋ ต๋‹ค. Code Base์˜ ์žฅ์  - ์ฝ”๋“œ๋กœ ๊ตฌ์„ฑ๋˜์–ด ์žˆ์–ด ์Šคํ† ๋ฆฌ๋ณด๋“œ์— ๋น„ํ•ด ๊ฐ€๋ณ๋‹ค. - ์ถฉ๋Œ ๊ฐ€๋Šฅ์„ฑ์ด ๋‚ฎ์•„์ง„๋‹ค. Code Base์˜ ๋‹จ์  - ์–ด๋–ค ํ™”๋ฉด์ด ๋งŒ๋“ค์–ด์งˆ์ง€ ํŒŒ์•…ํ•˜๊ธฐ ํž˜๋“ค๋‹ค. - ํ•ด๋‹น ์ปดํฌ๋„ŒํŠธ๋ฅผ ์•Œ๊ณ ์žˆ์–ด์•ผ ํ•œ๋‹ค.
[iOS/Swift] Alamofire๋กœ ์„œ๋ฒ„(FastAPI)์— ๋™์˜์ƒ ์—…๋กœ๋“œํ•˜๊ธฐ
ยท
iOS/Swift
์Šฌ์Šฌ ์บก๋””๊ฐ€ ๋๋‚˜๊ฐ„๋‹ค.. ์‹œ๊ฐ„์ด ๋‚จ์•„์„œ ์‚ฝ์งˆ ์—„์ฒญํ–ˆ๋˜ ๋ถ€๋ถ„์„ ์ •๋ฆฌํ•ด๋ณด๋ ค๊ณ  ํ•œ๋‹ค. Alamofire ๊นƒ ์ฃผ์†Œ https://github.com/Alamofire/Alamofire ์ฒ˜์Œ์— ํ—ท๊ฐˆ๋ ธ๋˜๊ฒŒ ๋™์˜์ƒ์€ ์–ด๋–ค ํ˜•์‹์œผ๋กœ ์ €์žฅํ•ด์„œ ๋„˜๊ฒจ์•ผํ•˜๋Š”์ง€ ์ž˜ ๋ชฐ๋ž์—ˆ๋‹ค. URLํ˜•์‹์œผ๋กœ ๋„˜๊ธฐ๋‹ˆ๊น ์ž˜ ๋„˜๊ฒจ์กŒ๋‹ค. ์ฐธ๊ณ ๋กœ ๋™์˜์ƒ์€ ์•จ๋ฒ”์—์„œ ๊ฐ€์ ธ์™€์„œ ์ €์žฅํ–ˆ๋‹ค. (์ด ๋ถ€๋ถ„ ์ฝ”๋“œ๋Š” ์ƒ๋žตํ•จ) import Alamofire class ViewController: UIViewController { //๋™์˜์ƒ ์ €์žฅ var videoURL: URL? //๋ฒ„ํŠผ ํด๋ฆญํ•˜๋ฉด ์„œ๋ฒ„๋กœ ๋™์˜์ƒ ์ „์†ก @IBAction func reportButtonClicked(_ sender: UIBarButtonItem) { do { print("videoURL : \..
[iOS/Swift] ์นด๋ฉ”๋ผ๋กœ ๋™์˜์ƒ ์ดฌ์˜ํ•˜๊ธฐ
ยท
iOS/Swift
๋จผ์ € ์˜์ƒ ์ดฌ์˜๊ณผ ์ €์žฅ์„ ์œ„ํ•ด ๊ถŒํ•œ ์„ค์ •์„ ํ•ด์•ผํ•œ๋‹ค. import UIKit class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view. } @IBAction func videoButton(_ sender: UIButton) { let camera = UIImagePickerController() camera.delegate = self camera.sourceType = .camera camera.mediaTypes = UIImagePickerController.availableMediaTypes(for: .ca..