몽섭
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Week5 피어세션 S2 - S004 강현준 👨🏻‍💻 - S015 노신희 👩🏻‍💻 - S025 신명섭 👨🏻‍💻 - S045 이지수 👩🏻‍💻 - S049 이태혁 👨🏻‍💻 👑 (a.k.a 이 시대의 성군) (지혜 of 지혜) + (근엄 그 자체) - S050 이하원 👨🏻‍💻 - S060 최희주 👩🏻‍💻 ## 주제 ### Network 로직 부분의 구현부 **답변1)** NetworkManager를 만들고, 사용할 class에서 가져와서 사용함 + 통신의 결과를 담는 자료구조를 따로 만듦 **답변2)** 비동기 통신으로 인해 발생하는 문제를 handler (@escaping closure)를 통해 callback을 받아서 해결함 **리뷰어님의 조언 공유)** URLSession.shared가 싱글톤(?)이라서 한 번에 하나만 사용할 수 있는 것 같고 문제가 발생할 수 있을 것 같음 -> shared가 아닌 새로운 URLSession을 만들어서 관리하는 APIManager를 만드는게 어떤가? 라고 이해하는게 어떨까. URLSession에 대한 추가적인 공부가 필요할 것 같다. **답변3)** 비동기 통신으로 인해 발생하는 문제를 semaphore를 사용하여 해결함 - 세마포어 등등 - 응답이 오기 전까지는 앱이 멈추는 것이므로 사용을 자제하는 것이 좋을 것 같음, 하지만 이런 방법이 있긴 하다. - 에러의 소지가 다분한 방식 - Semaphore 대신 GCD의 DispatchGroup(?)을 사용하는 것은 어떨까? - 왜 DispatchGroup이 나은지에 대해 명확하게 알지 못함. 추가적인 공부가 필요할 것 같음. **답변4)** completion만 주지 말고, 리턴으로 해당 네트워킹이 제대로 처리되었는지 확인할 방법이 필요할 것 같다. **답변5)** async await 사용, error Handler를 통해서 원하는 데이터를 받지 못 했을 때에 대한 처리를 해줌 - Generic을 사용해 네트워킹 로직 안에서 Encoding Decoding까지 처리 **답변6)** - 이스케이핑을 사용한다면 네트워크 메서드 내의 모든 guard 문에서 핸들러를 리턴해줘야 오류가 없을 것 같다 ### 키보드 설정 (다크모드시 Shift키 클릭시 경고 메시지) 해결 방식 왜뜨지..? 에러가 다양하게 뜨네..? 이상하네...? 애플이 잘못했다!! ### 화면전환 우->좌 구현 방식 **방법1)** CATransition을 사용해서 화면 전환을 구현했다! **방법2)** custom segue를 만들어주었다. segue의 perform을 override해서 다음 화면을 지정해준 뒤 화면 전환 방식을 구현하였다. (꿀팁 참고) ### Delegate 구현 위치 & 방식 **방법1)** - 각각의 delegate를 담당하는 class파일을 따로 만들어 해당 class가 delegate에 관한 모든 구현을 담당한다 **방법2)[하원님st]** - 뷰와 delegate가 n:1 매칭이 아닌, 1:1 매칭이 되도록 구현하였다 - 이유: n:1 일 경우에 delegate는 어떠한 뷰인지 특정을 해야하므로 delegate가 view를 참조하는 현상이 발생한다. - 비교 로직을 구현하기 위해 3번째 TextField에서 2번째 TextField를 weak 참조할 수 있게 되어있다. ( 아숩 ) ### UICollectionViewDelegateFlowLayout **질문** - Header의 width는 변경이 안 되는 걸까? - `referenceSizeForHeaderInSection`의 `CGSize`에서 변경을 해도 안 먹히던데 가능한건가? > - If you do not implement this method, the flow layout uses the value in its headerReferenceSize property to set the size of the header. During layout, only the size that corresponds to the appropriate scrolling direction is used. For example, for the vertical scrolling direction, the layout object uses the height value returned by your method. (In that instance, the width of the header would be set to the width of the collection view.) If the size in the appropriate scrolling dimension is 0, no header is added. - 해당 Header width는 스크롤뷰의 방향에 따라 세로로는 바뀜, 그러나 가로로는 컬렉션뷰의 크기에 정해짐 ### 2번째 섹션 배경색 구현 방식 - 넘어갑시다~ - JK님 자료에 의하면 background에 해당하는 변수가 보이는데, 실제 코드에서는 안 보인다? ### 섹션 토글 구현 방식 - Header에 Tap Gesture를 이용하여 하는 방식 - Header를 만들때 section 정보와 Tap Gesture를 주입시켜준다. - UIButton을 section header에 넣어서 Action이 발생할 때 마다 UIView.animated 를 호출해서 구현한다!. ## 꿀팁🍯 Segue Custom [Segue Custom1](https://minominodomino.github.io/devlog/2019/06/01/ios-UnwindSegueAndCustomSegue/) [Segue Custom2](https://aggapple.tistory.com/95) ## 잡담🗣 퀸희주 : 3시간 쉽니다 ㅋㅋㅋㅋㅋㅋㅋㅋㅋ 기원후 21세기 희주왕 희주왕께서 가라사대 .... ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ 신희님 추천합니다 회원가입 화면 왕권몰락 zㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ 태혁왕 왕 재밌었습니다. ㅋㅋㅋ Delegate 어려워요 좋았습니다. 태혁님의 리드에 꺄르륵 꿀잼🍯 나만몰라 저도 몰라요. 머리에 쥐나요ㅠㅠ🐭

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully