Giter Site home page Giter Site logo

swift-photoframe's Introduction

Step 1 - Tabbed App

자동 생성된 ViewController 클래스 viewDidLoad() 함수에서 print(#file, #line, #function, #column) 코드를 추가하고 실행하면 콘솔 영역에 무엇이 출력되는지 확인한다.

/Users/ador/swift-photoframe/PhotoFrame/PhotoFrame/ViewController.swift 15 viewDidLoad() 40

Step 2 - IBOutlet

  • First View label을 IBOutlet으로 연결한다.
  • 코드로 label 속성을 변경한다.

step2

Step 3 - IBAction

  • First View에 next 버튼 추가
  • next 버튼에 IBAction 연결하고 구현부 작성

beforenext

Step 4 - Segue

  • Main.storyboard에 scene 추가
  • 새로운 scene으로 segue 연결

yellowblue

Step 5 - ViewController

  • custom view controller를 생성하고 main 스토리보드에서 연결
  • 스토리보드에서 segue를 제거하고 custom class에서 IBAction으로 화면 전환하도록 수정
  • close 버튼과 action 추가
  • view life cycle과 관련된 콜백 함수의 동작 확인

step5-1step5-2

Step 6 - Container ViewController

  • Navigation Controller embed in
  • 네비게이션 화면 전환을 위해 present()에서 pushViewController()로 변경
  • 스토리보드에서 navigation bar 영역에 BarButtonItem 추가하고 IBAction 연결

step6-1step6-2

Step 7 - Second Scene

  • 두 번째 tab bar 화면에 UIImageView 추가
  • 다음 버튼을 클릭할 때마다 asset 에서 랜덤하게 이미지를 가져오도록 구현
  • image는 비율을 유지하면서 크기에 맞게 표시
  • second scene의 autolayout 설정

step7

Step 8 - Photo Frame

  • PhotoFrame 이미지뷰 추가
  • UIImagePickerController로 사진 앱에서 이미지를 선택해 가져올수 있도록 추가

step8-2step8-1

swift-photoframe's People

Contributors

godrm avatar o-o-wl avatar lenaios avatar cocomilktea avatar

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.