Giter Club home page Giter Club logo

swift_expert's People

Contributors

kangddong avatar

Stargazers

 avatar

Forkers

lii0730 kangddong

swift_expert's Issues

[CS] 동시성 문제, 경쟁 조건 (Race Condition)의 문제

p675 내용입니다.

그중에서 가장 유의해야 할 것이 바로 동시성(Concurrency) 문제 그중에서도 경쟁 조건의 문제에 대해서 나옵니다

프로세스 동기화에 대해서 설명하고있습니다.

  1. 경쟁 조건 (Race Condition)의 문제
  2. 은행 게좌 문제
  3. 임계구역 (The Critical-Section Problem)

저처럼 모르시는 분들 같이 찾아보아요 !

[CS] 객체 직렬화(Serialization)란 ?

p653 에는 다음과 같이 정리되어있습니다.

프로퍼티 리스트는 애플의 주요 소프트웨어 프레임워크에 이용되는 객체 직렬화를 위한 XML 형식의 파일입니다.

  • 객체 직렬화란, 객체의 내용을 바이트 단위로 변환하여 파일에 기록하거나 네트워크를 통해 전달이 가능하도록 하는 것을 의미합니다.

문득, 객체 직렬화는 언제 사용이 되는지, 왜 사용하는지 궁금해졌습니다.
객체 병렬화도 있는지도 궁금해서 찾아보니 직렬화 된 데이터 스트림을 원래의 파일로 만드는 역직렬화라고 있네요 ㅋㅋ

아시는 분들 있으면 코멘트 부탁드려요 ! 공부해서 정리하면 공유드리겠습니다.

[Swift] : iOS 13-> 15 변경점 정리 (CH03-TabBar)

챕터3의 340페이지부터 설명하는 외형 프록시 객체는 iOS 13 기준으로 되어있어, 같은 부분을 iOS 15 버전으로 적용했습니다.

WWDC 2021에서 발표된 내용

While UIKit does its best to make this new appearance seamless in your app, there are a few issues you may encounter. You should audit your code for places where you may be setting a bar’s translucent property to false and check for any UIViewControllers that have non-standard edgesForExtendedLayout. Both of these conditions will cause visual issues with the new appearance. (대충 UIKit의 기능 확장으로 인해 사양이 바뀌어 기존 방법을 사용할 수 없다는 뜻이래요.)

기존에 시도했던 내용

let tbC = UITabBarController()

// 흰 배경만 나옴
tbC.tabBar.backgroundImage = UIImage(named: "menubar-bg-mini")

// 검은 배경만 나옴
tbC.tabBar.isTranslucent = false
tbC.tabBar.backgroundImage = UIImage(named: "menubar-bg-mini")

iOS 15 이후 변경점

if #available(iOS 15.0, *) {
    let tbC = UITabBarController()
    // UITabBarAppearance
    let tbProxy = UITabBarAppearance()
    
    // 배경 정상 적용을 위한 메소드
    tbProxy.configureWithOpaqueBackground()
    // 배경 적용
    tbProxy.backgroundImage = UIImage(named: "menubar-bg-mini")
    
    // TabBarItem의 속성 설정을 위한 Appearance
    let tbItemProxy = tbProxy.stackedLayoutAppearance
    
    // normal 상태의 titleTextAttributes
    tbItemProxy.normal.titleTextAttributes = [.font: UIFont.systemFont(ofSize: 15)]
    // selected 상태의 iconColor(tintColor와 동일하다고 보시면 될 것 같아요)
    tbItemProxy.selected.iconColor = .white
    // selected 상태의 titleTextAttributes
    tbItemProxy.selected.titleTextAttributes = [.foregroundColor: UIColor.red]
    // disabled 상태의 titleTextAttributes
    tbItemProxy.disabled.titleTextAttributes = [.foregroundColor: UIColor.gray]

    // Appearance 적용하기
    // standard -> 스크롤 도중, scrollEdge -> 스크롤 안할 때
    tbC.tabBar.standardAppearance = tbProxy
    tbC.tabBar.scrollEdgeAppearance = tbC.tabBar.standardAppearance
} else {
    // 책의 내용
}
  • 스크린샷
    스크린샷 2022-08-21 11 30 32

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.