> For the complete documentation index, see [llms.txt](https://pakornpat.gitbook.io/ios-app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pakornpat.gitbook.io/ios-app/master.md).

# iOS App development

## แอปที่เราจะได้หลังจากเรียน

หลังจากที่เราเรียนจบเราจะได้ Todo app มาหนึ่งอัน ในปัจจุบันการพัฒนาแอปจะมี Framework หลักคือ UIKit และ SwiftUI แต่สำหรับบทเรียนนี้เราจะใช้ UIKit เป็นหลัก เนื่องจากการทำงานในปัจจุบันบางแอปยังจำเป็นต้องซัพพอร์ต iOS ที่มีเวอร์ชั่นเก่า ซึ่งยังไม่สามารถใช้ SwiftUI ในการพัฒนาได้

![](/files/B7cYMYwsbu8CkbUH5BP5)

## สิ่งที่เราจะเรียนกัน

1. **Swift พื้นฐาน**
   1. ตัวแปร การประกาศและ Type เบื้องต้น
   2. ฟังก์ชั่น
   3. การใช้งาน Protocol ทั้งการสร้างเองและใช้งานของที่มีอยู่แล้ว
2. **MVC เบื้องต้น**&#x20;
3. **Xcode รู้จักและใช้งานส่วนต่าง ๆ**&#x20;
4. **พื้นฐานการพัฒนาแอป iOS**&#x20;
   1. Cycle การทำงานของแอปเบื้องต้น
   2. Cycle การทำงานของหน้าจอ
   3. รู้จัก View ต่าง ๆ เช่น TableView, Label, TextField, Switch, Button และอื่น ๆ
   4. Outlet คืออะไร Action คืออะไร และ Delegate
   5. การจัด Auto layout เบื้องต้น
   6. Navigation ระหว่างหน้า การใช้งาน Segue
   7. การ custom view ของ tableViewCell
   8. การใช้งาน drag and drop เบื้องต้น
   9. การ encode, decode บันทึกและอ่านข้อมูลจากไฟล์

{% hint style="info" %}
ในขณะที่เขียนเนื้อหานี้ใช้ Xcode 13 และ Swift 5 และใช้ Framework UIKit ในการพัฒนา
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://pakornpat.gitbook.io/ios-app/master.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
