รู้สถานะ Foreground/Background สำคัญสำหรับจัดการ Background Downloads, Eventsใช้ NotificationCenter อ่านรายละเอียดขั้นตอนที่ 1: สร้างโปรเจกต์Xcode → New Project → Single View Application → ชื่อ ForegroundBackgroundขั้นตอนที่ 2-4: โค้ด ViewController.swiftimport UIKitclass ViewControll