Giter VIP home page Giter VIP logo

practice001's Introduction

課題01

作成日

2023年6月12日

使い方

  1. ターミナルを起動する
  2. ターミナルでmkdir ~/Documents/iOSPracticeと入力して新しいフォルダを作成する
  3. 上記を実行後、ターミナルにcd ~/Documents/iOSPracticeと入力してディレクトリを移動する
  4. ディレクトリを移動したら、ターミナルにgit clone https://github.com/MaskerDog/Practice001.gitと入力して、リポジトリをローカルにクローンする(自分のPCにダウンロードするようなもの)
  5. クローンができたらopen Practice001/Practice001.xcodeproj/と入力してXcodeでプロジェクトを開く
  6. Xcodeからシミュレーターを起動する
  7. 次の画像が表示されることを確認する

image

目的

  1. Xcodeに慣れる
  2. 入力を恐れない

やること1

まず模写をする。
ContentViewを次のように修正をする。

struct ContentView: View {
    var body: some View {
        VStack {
            Text("Good")
            Image(systemName: "sun.max.fill")
            Text("Morning")
        }
    }
}

やること2

VStackをHStackに変えて変化を見る。
書く前に、「どうなるか?」をイメージしてから変えること。

  • VStackは部品を上から下に並べてくれる
  • HStackは部品を左から右に並べてくれる

やること3

sun max fill@2x
この画像の色を青くする。
画像の色の変更は

Image(systemName: "sun.max.fill")
    .foregroundColor(Color.blue)

でできる。

やること4

画像の色変更ができたので、違う色に変えてみる。
やること3で青くした画像の色を別の色に変えてみる。
Color.まで打つと候補が出てくるので、自由な色を選択する。

やること5

Text("Morning")の次の行に好きなSymbolsを加える。 まず、Text("Morning")の末尾で改行をする。

image 上部の「+」アイコンがライブラリの表示である。
一番左の を選択して、Symbolsに変更する。

Symbolsから好きな画像を選ぶ。 image 選んだら、ドラッグをしてText("Morning")の後ろに配置をする。

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.