๊ณต๋ถ€ ์—ฐ์Šต์žฅ :-)

TIL_2019_01

|

2019.01.02

  • git remote origin ์ฃผ์†Œ๋ฅผ ๋ณ€๊ฒฝํ• ์ผ์ด ์ƒ๊ฒผ๋‹ค.
  • ํ„ฐ๋ฏธ๋„์—์„œ ํ•ด๋‹น ๊ฒฝ๋กœ์˜ .gitํŒŒ์ผ๋กœ ์ ‘๊ทผํ•˜๊ณ , vi๋กœ git configํŒŒ์ผ์„ ์—ด์–ด์„œ remote origin๊ฒฝ๋กœ๋ฅผ ๋ฐ”๊ฟ”์ค€๋‹ค.
  • ์ €์žฅํ›„ ๋‹ค์‹œ ์ƒ์œ„๊ฒฝ๋กœ (.gitํŒŒ์ผ์ด ์žˆ๋Š” ๊ฒฝ๋กœ)๋กœ ์ด๋™ํ•ด์„œ git remote -v๋ช…๋ น์–ด๋กœ ๋ณด๋ฉด ์ฃผ์†Œ๊ฐ€ ๋ฐ”๊ปด์žˆ๋‹ค.
  • ์ปค๋ฐ‹ํ›„ ๋ณ€๊ฒฝ๋œ origin์ฃผ์†Œ๋กœ ์ตœ์ดˆ ํ‘ธ์‹œ ํ• ๋•Œ remote์ €์žฅ์†Œ์˜ username๊ณผ password์ž…๋ ฅ์„ ์š”์ฒญํ•˜๋Š”๋ฐ, ์ด๋•Œ ํ•ด๋‹นํ•˜๋Š” ์•„์ด๋””์™€ ํŒจ์Šค์›Œ๋“œ๋ฅผ ์ž…๋ ฅํ•˜๋ฉด ํ‘ธ์‹œ ์„ฑ๊ณต
  • cf) gitconfigํŒŒ์ผ์—์„œ ์ง์ ‘ ๋ณ€๊ฒฝํ•˜์ง€ ์•Š๊ณ  git remote set-url ๋ช…๋ น์–ด๋ฅผ ์‚ฌ์šฉํ•ด๋„๋œ๋‹ค.
    • ์˜ˆ์‹œ) git remote set-url origin https://github.com/user/repo2
    • ๋‘ ๊ฐœ์˜ ์ธ์ž๋ฅผ ๊ฐ€์ง„๋‹ค.
    • ๊ธฐ์กด ์›๊ฒฉ ์ €์žฅ์†Œ ์ด๋ฆ„: origin
    • ์ƒˆ๋กœ์šด ์›๊ฒฉ ์ €์žฅ์†Œ URL : https://github.com/user/repo2.git
  • ์ฐธ๊ณ ๋งํฌ - ๋ฏผ์†Œ๋„ค ๋ธ”๋กœ๊ทธ

2019.01.03

  • ์ปค๋ฎค๋‹ˆํ‹ฐํƒญ(ํƒ€์ž„๋ผ์ธ๋ทฐ์ปจ ๋ฆฌํŒฉํ† ๋ง)
  • CommunityMainViewController
  • ์ปจํ…Œ์ด๋„ˆ๋ทฐ์ปจํŠธ๋กค๋Ÿฌ - ๊ฒฐํ˜ผ์ค€๋น„/์˜ˆ์‹ /์ƒˆ๋Œ๋ฐฉ/์Šค๋“œ๋ฉ”๊ฒฌ์ 
  • UITabBarController

2019.01.04

  • ๋งˆํŠธ์•ฑ์—์„œ ๋งˆํŠธ ์ฃผ์†Œ ๋ณต์‚ฌํ–ˆ์„๋•Œ ํด๋ฆฝ๋ณด๋“œ ๋„์šฐ๊ธฐ๋ฅผ ์œ„ํ•ดโ€ฆ ์‡ผํ•‘๋ชฐ ์•ฑ์—์„œ ์•„์ฃผ ์ž˜ ์‚ฌ์šฉํ–ˆ๋˜ ์ „์ˆ˜์—ด๋‹˜์˜ Toaster ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๋ฅผ ์„ค์น˜ํ–ˆ๋‹ค. ๋šœ๋‘ฅ ํ•˜์ง€๋งŒ unittest๋ฅผ ์œ„ํ•ด์„œ ๋งŒ๋“  ํ”„๋กœ์ ํŠธ ํƒ€๊ฒŸ์˜ swift๋ฒ„์ „์ด 4๋ผ์„œ ๋ญ”๊ฐ€ ์•ˆ๋๋‹ค.
  • ์–ด์ฐจํ”ผ ์ผ๋‹จ ํ…Œ์ŠคํŠธ์—๋Š” pod์ด ํ•„์š”ํ•˜์ง€์•Š๊ธฐ๋•Œ๋ฌธ์— ํ…Œ์ŠคํŠธํƒ€๊ฒŸ์—” pod์ด ์„ค์น˜๋˜์ง€ ์•Š๋„๋ก ํ•จ.
  • ์ด๋žฌ๋”๋‹ˆ ๋˜โ€ฆ๋ช‡๋ช‡ ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ๊ฐ€ ์Šค์œ„ํ”„ํŠธ ๋ฒ„์ „์ด ๋งž์ง€ ์•Š์•„์„œ ๋นŒ๋“œ๊ฐ€ ์•ˆ๋จ!
  • ๊ทธ๊ฑฐ ๊ณ ์น˜๋‹ค๊ฐ€ UIWindow.level์ด๋ž€๊ฒƒ์„ ์•Œ๊ฒŒ๋˜์—ˆ๋‹ค!
  • window๊ฐ„์˜ ์ƒ๋Œ€์ ์ธ level์„ ๋‚˜ํƒ€๋‚ด๋Š”๋ฐ, ๋‚œ zposition๊ฐ™์€ ๋Š๋‚Œ์œผ๋กœ ์ดํ•ดํ–ˆ๋‹ค. (๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ์—์„œ๋Š” windowLevel์„ CGFloat๊ฐ’์˜ ์ตœ๋Œ€๊ฐ’์„ ์ค€๊ฑฐ๊ฐ™์€๋ฐ, (CGFloat.greatestFiniteMagnitude)์ด๊ฒŒ UIWindow.Level๊ฐ์ฒด๋กœ ๋ณ€๊ฒฝ๋œ ๊ฒƒ ๊ฐ™์Œ.(https://zeddios.tistory.com/567)
  • pod update [PODNAME]์„ ์ด์šฉํ•ด์„œ ์›ํ•˜๋Š” pod๋งŒ ์—…๋ฐ์ดํŠธํ•œ๋‹ค.

2019.01.07

  • UIScrollView์˜ contentOffset.y
    • https://www.youtube.com/watch?v=fgwVqCGgHZA
    • ์Šคํฌ๋กค๋ฐ”๊ฐ€ ๋‚ด๋ ค๊ฐˆ๋•Œ(content ๋ทฐ๊ฐ€ ์˜ฌ๋ผ๊ฐˆ๋•Œ) contentOffset.y๊ฐ€ ์ปค์ง
    • ์Šคํฌ๋กค๋ฐ”๊ฐ€ ์˜ฌ๋ผ๊ฐˆ๋•Œ(content ๋ทฐ๊ฐ€ ๋‚ด๋ ค๊ฐˆ๋•Œ) contentOffset.y๊ฐ€ ์ž‘์•„์ง
  • ํ•œ ํ…Œ์ด๋ธ”๋ทฐ ์•ˆ์—์„œ ๋‹ค๋ฅธ ๋””์ž์ธ์˜ ์…€์„ ๊ตฌํ˜„ํ•˜๊ธฐโ€ฆ(์ด๋ ‡๊ฒŒ ํ• ์ˆ˜๋ฐ–์—์—†๊ตฌ๋งŒใ… ใ… )
    • https://medium.com/@stasost/ios-how-to-build-a-table-view-with-multiple-cell-types-2df91a206429

2019.01.09

  • Detached head..๋ณ€๊ฒฝ์‚ฌํ•ญ์„ ํ๊ธฐํ•˜๊ณ ์‹ถ์–ด์„œ ํ˜„์žฌ ์ปค๋ฐ‹์ƒํƒœ์ธ ์ƒํƒœ์—์„œ ์ผ๋ถ€๋Ÿฌ git checkout ํ˜„์žฌ์ปค๋ฐ‹ ์ด๋ ‡๊ฒŒ ํ–ˆ๋”๋‹ˆ ์ด๋ ‡๊ฒŒ๋˜์–ด๋ฒ„๋ ธ๋‹ค.. ``` mijinjeon@iMac-2 ๎‚ฐ ~/Documents/practice/iOS/Cloning/Cloning-wdb ๎‚ฐ ๎‚  master โ— ๎‚ฐ git checkout cbb9592d4f350e25ad4d06aa4afb67299d89642b M CloneWDB/CloneWDB.xcodeproj/project.xcworkspace/xcuserdata/mijinjeon.xcuserdatad/UserInterfaceState.xcuserstate Note: checking out โ€˜cbb9592d4f350e25ad4d06aa4afb67299d89642bโ€™.

You are in โ€˜detached HEADโ€™ state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example:

git checkout -b

HEAD is now at cbb9592 Add assets ```

  • HEAD๊ฐ€ detached์ƒํƒœ๋ฉด ์ปค๋ฐ‹์„ ์žƒ์–ด๋ฒ„๋ฆด ์ˆ˜ ์žˆ๋‹ค. git refs ๋‚ด์˜ ๋Œ์•„๊ฐ€๊ณ ์‹ถ์€ ์ปค๋ฐ‹์ƒํƒœ๋กœ ๋Œ์•„๊ฐ€๋Š” ๊ฒƒ์€ ๊ถŒ์žฅ๋˜์ง€ ์•Š๊ณ , (์‹ฌ์ง€์–ด ๋‚˜๋Š” abc123์ปค๋ฐ‹์ƒํƒœ์—์„œ abc123์œผ๋กœ ์ฒดํฌ์•„์›ƒ์„ํ•ด๋ฒ„๋ฆผ..) ์ด๋•Œ ์ž„์‹œ๋กœ ๋ธŒ๋žœ์น˜๋ฅผ ๋งŒ๋“ค์–ด์„œ ์ž„์‹œ ๋ธŒ๋žœ์น˜๋กœ ์ฒดํฌ์•„์›ƒํ–ˆ๋‹ค๊ฐ€ ์›๋ž˜ ๋ฌธ์ œ๊ฐ€ ๋œ detached HEAD์ƒํƒœ์˜ ๋ธŒ๋žœ์น˜๋กœ ๋Œ์•„์˜ค๋ฉด, ๋ธŒ๋žœ์น˜๊ฐ€ ๋Œ์•„์™”์„๋•Œ ์ž๋™์œผ๋กœ ์ตœ์‹  ์ปค๋ฐ‹์ƒํƒœ๋ฅผ ์—…๋ฐ์ดํŠธํ•ด์ฃผ๊ธฐ๋•Œ๋ฌธ์— ์‰ฝ๊ฒŒ ํ•ด๊ฒฐ์ด ๊ฐ€๋Šฅํ•˜๋‹ค!
  • ์ฐธ๊ณ ๋งํฌ

2019.01.10

  • ๋งˆ์Œ์„ ๋‹ค์žก์•„์•ผํ•œ๋‹ค! ์˜ค๋Š˜ ๋งˆ์Œ ๋‹ค์žก๊ณ  ์•ฑ ํด๋กœ๋‹ ์‹œ์ž‘ํ–ˆ๋‹ค. ์•ž์œผ๋กœ ๊ณผ์—ฐ ํ• ์‹œ๊ฐ„์ด์žˆ์„๋Ÿฐ์ง€๋‚˜ ๋ชจ๋ฅด๊ฒ ์ง€๋งŒ..ใ…Ž_ใ…Ž;
  • XLPagerTabStrip ์งท์ข‹๋‹ค. ๋งŽ์€ ๋ถ€๋ถ„์„ ํ™œ์šฉํ•  ์ˆ˜ ์žˆ์„๋“ฏ
  • UIScrollView์•ˆ์— UIStackView ๋„ฃ์–ด์„œ ์˜คํ† ๋ ˆ์ด์•„์›ƒ์œผ๋กœ ์กฐ์ •ํ•ด์„œ ์Šคํฌ๋กค ๋™์ž‘ํ•˜๊ฒŒ ํ•˜๋Š”๊ฑด ๋ช‡๋ฒˆ์„ ํ•ด๋„โ€ฆํ•œ๋ฒˆ์— ๋œ ์ ์ด ์—†๋„คใ… ใ…  ํ•ญ์ƒ ๋ฐ๋ชจ๋กœ ํ• ๋•Œ๋Š” ์ž˜๋˜๋Š”๊ฑฐ๊ฐ™์€๋ฐ.. ์•„์ง ์ž˜ ๋ชจ๋ฅด๋Š”๊ฑฐ ์ดํ•ดํ•˜๊ณ ์‹ถ๋‹ค.

2019.01.28

  • ํ•ด์ปค๋žญํฌ ๋ฌธ์ œ๋ฌธ์ œ
    • https://www.hackerrank.com/challenges/day-of-the-programmer/problem
    • ๋ฌธ์ œ๊ฐ€ ๋„ˆ๋ฌด ๊ธธ๋‹คโ€ฆ ๋‹ค ๊ผผ๊ผผํžˆ ์ฝ์„ ํ•„์š” ์—†๋Š”๋ฐ ๋‹ค ์ฝ๋Š๋ผ ์‹œ๊ฐ„๋ณด๋ƒ„
    • ๊ฒฐ๊ตญ ๋‚ด๊ฐ€ ์•Œ๊ณ ๋ฆฌ์ฆ˜ ๋ฌธ์ œ ์œ ํ˜•์— ์ต์ˆ™ํ•˜์ง€ ์•Š๋‹ค๋Š”๊ฒƒโ€ฆ๊ณต๋ถ€์ข€ ํ•˜์ž ใ… ใ… 

2019.01.29

  • ํ•ด์ปค๋žญํฌ ๋ฌธ์ œ๋ฌธ์ œ ๋˜ ํ’ˆ
    • https://www.hackerrank.com/challenges/strong-password/problem
    • UI๊ฐœ๋ฐœ์„ ํ•˜๋‹ค๋ณด๋ฉด ์ง„์งœ ์“ฐ๋˜ ํด๋ž˜์Šค์˜ ์“ฐ๋˜ ๋ฉ”์†Œ๋“œ๋งŒ ์“ฐ๊ฒŒ๋˜๋Š”๋ฐ ์—„์ฒญ ์‰ฌ์šด๋ฌธ์ œ๋ผ๋„ ํ’€์–ด๋ณด๋‹ˆ๊นŒ ๊ธฐ๋ณธ์ ์ธ ์Šค์œ„ํ”„ํŠธ ๋ฌธ๋ฒ•์„ ๋‹ค์‹œ ์ตํžˆ๋Š” ๊ธฐ๋ถ„์ด๋ผ ๋ณด๋žŒ์ฐจ๋‹ค. dictionary๋Š” ํ‰์†Œ์— ์ž˜ ์‚ฌ์šฉ์„ ์•ˆํ•ด์„œ ๋ชฐ๋ž๋Š”๋ฐ, ๋ฐ”๋กœ value์— ์ ‘๊ทผํ•ด์„œ ๊ฐ’ ํ•„ํ„ฐ๋ง์„ ํ• ์ˆ˜์žˆ์—ˆ๋‹คโ€ฆ๋œ๋œ ๋‚ด๊ฐ€ ๋„ˆ๋ฌด ๋Šฆ๊ฒŒ์•ˆ๊ฑด๊ฐ€

Comments