Rhode
    • 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
    • Engagement control
    • 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 Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control 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
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    # UIBackgroundConfiguration 특정 background appearance를 표현하는 configuration **(deployment iOS 14.0+)** </br> ## Declaration ```swift struct UIBackgroundConfiguration ``` </br> ## Overview Background configuration은 뷰의 배경을 만드는 간단한 방법을 제공한다. Background configuration을 사용하면 다양한 뷰의 상태에 대한 시스템 기본 배경 스타일을 얻을 수 있다. Background configuration을 `UICollectionView` 및 `UITableView`의 cell, header 및 footer 또는 `UIButton`에 직접 적용한다. **Background Configuration 사용하기** 1. 기본 시스템 스타일 중 하나로 background configuration을 만든다. 2. 추가 customizing이 필요한 경우 뷰의 스타일과 일치하도록 configuration을 수정한다. 3. 뷰의 현재 background configuration을 수정한 configuration으로 설정한다. ```swift var backgroundConfig = UIBackgroundConfiguration.listPlainCell() // Set a nil background color to use the view's tint color. backgroundConfig.backgroundColor = nil cell.backgroundConfiguration = backgroundConfig ``` 투명한 배경을 생성하는 `clear()`를 사용하여 빈 background configuration을 생성하여 시작할 수도 있다. 각 시스템 background 스타일은 다양한 configuration 상태([UIConfigurationState](https://developer.apple.com/documentation/uikit/uiconfigurationstate))에 대한 시스템 기본값을 제공한다. `automaticallyUpdatesBackgroundConfiguration` 프로퍼티가 true인 뷰에 background configuration을 적용하면 뷰의 상태가 변경될 때 시스템이 자동으로 background configuration을 업데이트한다. 시스템 기본값 이외의 추가 customizing을 원하는 경우 뷰의 `updateConfiguration(using:)`메서드를 override하여 background configuration을 수동으로 업데이트 하도록 선택할 수 있다. ```swift override func updateConfiguration(using state: UIConfigurationState) { // Get the system default background configuration for a plain style list cell in the current state. var backgroundConfig = UIBackgroundConfiguration.listPlainCell().updated(for: state) // Customize the background color to use the tint color when the cell is highlighted or selected. if state.isHighlighted || state.isSelected { backgroundConfig.backgroundColor = nil } // Apply the background configuration to the cell. self.backgroundConfiguration = backgroundConfig } ``` 뷰에 configuration을 적용하면 UIKit이 background의 실제 그리기 및 렌더링을 수행한다. 자체 배경을 렌더링하는 대신 background configuration을 사용하는 경우 시스템은 자동 뷰 계층구조 관리, 상호작용 및 중단 가능한 애니메이션/전환에 대한 지원, 성능 최적화를 제공한다. </br> ## Topics ### Creating cell background configurations * static func `listPlainCell()` * plain list cell 스타일의 default configuration 생성. ![](https://i.imgur.com/BcfGkwo.png) * static func `listGroupedCell()` * grouped list cell 스타일의 default configuration 생성. ![](https://i.imgur.com/FRyyd9b.png) * static func `listSidebarCell()` * sidebar list cell 스타일의 default configuration 생성. ![](https://i.imgur.com/mGrMLbq.png) ### Creating an empty background configuration * static func `clear()` * 투명한 배경, default styling이 없는 빈 background configuration 생성. ### Customizing the background * var `customView` * 배경의 custom view * var `cornerRadius` * 배경과 테두리의 corner 커브를 사용하기 위한 preferred corner radius * var `backgroundInsets` * 갖고있는 뷰의 가장자리에 상대적인 배경 및 테두리의 inset(음수인 경우 outset) * var `backgroundColor` * 배경 색 * var `strokeColor` * 테두리 색 * var `strokeWidth` * 테두리 너비 * var `strokeOutset` * 셀과 테두리 사이 outset(음수일 경우 inset) ### Updating background configurations * func `updated(for:)` * 해당 셀의 state에 대한 configuration의 기본값을 customizing하지 않은 모든 프로퍼티에 적용하여 지정된 state에 대한 configuration을 생성한다. </br> [참고 문헌] * [zedd blog - SwiftUI) List Style 종류](https://zeddios.tistory.com/1111)

    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