Giter Site home page Giter Site logo

wwdc-memos's Introduction

Generating Cozy Games..🤖 🦥 🦾

Unity Projects

  • Introduction Watermelon game inspired funky arcade game
  • Engine Unity
  • Play in itch.io!

제목 없음-2

스크린샷 2024-03-07 오전 10 58 35

iOS (Xcode & Swift) Projects

스크린샷 2024-03-07 오전 11 02 27
  • Introduction Be a full stack developer with just two fingers
  • Tech Spec Xcode, Swift, MVVM, RxSwift, Storyboard & AutoLayout, Custom View, Core Animation
  • Download in App Store!
스크린샷 2024-03-07 오전 11 04 58

wwdc-memos's People

Contributors

eeeesong avatar

Watchers

 avatar

wwdc-memos's Issues

Building Custom Views with SwiftUI

SwiftUI View Layout의 기본 구조와 원칙

스크린샷 2022-08-14 오후 3 36 36

  • Text가 있고,
  • Text를 감싸는 ContentView가 있고,
  • ContentView를 감싸는, Safe Area inset을 제외한 영역인 Root View가 있다.
    • .edgesIgnoringSafeArea(.all) 을 통해, 해당 영역을 포함시킬 수 있긴 하다.

스크린샷 2022-08-14 오후 3 38 28

  • ContentView는 거의 항상 Root View와 같은 영역이므로, 사실상 2개의 layout만으로 이루어져 있다고 봐도 무방하다.

SwiftUI에서는 parent view가 child view의 사이즈를 강제하지 않는다.
child는 항상 자신이 원하는 만큼의 공간을 차지한다.
parent는 그것을 적당한 곳에 위치시키기만 할뿐..

  • Child chooses its own size <- 해오던 것과 다른 방식이다!
  • 위처럼 50, 10으로 정한다고 했을 때, 이 사이즈는 협상 불가다.

여기서 재밌는 점은 Frame을 constraint라고 생각하면 안 되고, View라고 생각해야한다는 것.

  • SwiftUI에서 이미지는 fixed 사이즈인데, 여기다가 frame을 추가하면 이미지보다 큰 영역이 잡힌다.
  • 이상하지 않다. frame은 view가 추가된 개념이기 때문에!

스크린샷 2022-08-14 오후 9 39 45

  • SwiftUI에서 잘못된 레이아웃이란 없다 (There's no wrong way to do it) -> UIKit에서 레이아웃이 깨지던 문제들은 없다는 것
  • 단, 마음에 안 드는 레이아웃은 있겠다.

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.