iOS: Getting Started with Swift

Eden·2024년 10월 25일
1

iOS

목록 보기
7/18
post-thumbnail

Let me introduce Swift

Swift is a programming language.

  • computers are electric so can only read 0s and 1s.
  • however, humans cannot understand those numbers.
  • therefore, programming languages are created.

so, when we write code using programming languages, compilers translate it into a form that computer or iPhone can understand.

Features of Swift

1️⃣ Modern Language

  • No need to use ; at the end.
  • Swift guesses what kind of data you are using.
  • It cleans up memory for you.
  • You can write non-blocking code with simple words.
  • Swift is like Kotlin.

2️⃣ Designed for Safety

  • Variables must have a value before you use them.
  • Swift keeps memory safe and clean.
  • Use:
    • var: A value that can change.
    • let: A value that stays the same.
  • Swift doesn’t allow empty values (called nil).
    • If you try, Swift gives an error!
    • To use nil, mark it Optional with ?.

3️⃣ Fast and Powerful

  • Swift is made to be very fast.
  • It changes code into machine language quickly.

4️⃣ Playgrounds

  • Swift has Playgrounds where you can try code easily and have fun!

Official site

If you need help, click the links below!
Apple Developer Documentation
Swift official site
Swift Programming LanguageGuide
Swift Programming Language Guide (korean)

Do u wanna build a playground?

1️⃣ Open Xcode.
2️⃣ Click File > New > Playground...
3️⃣ Choose Blank, then click Next.
4️⃣ Type the name of your project.
5️⃣ Click Create.

All done! 🎉 Now you can have fun coding!

profile
🌐 Frontend &&  iOS && 대학생

0개의 댓글