ใช้ UIApplication.shared.open(_:options:completionHandler:) กับ URL Scheme "tel://"
ขั้นตอนที่ 1: สร้างโปรเจกต์
Xcode → New Project → Single View Application → ชื่อ "MakeCall"
ขั้นตอนที่ 2: ออกแบบ UI
Main.storyboard: Text Field (กรอกเบอร์) + ปุ่ม Call

ขั้นตอนที่ 3-4: Outlet และ Action
@IBOutlet phoneNumberTextfield @IBAction callButtonClicked
ขั้นตอนที่ 5: โค้ดโทรออก
if let url = URL(string: "tel://\(phoneNumberTextfield.text!)"),
UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
}
ขั้นตอนที่ 6-8: ทดสอบ
กรอกเบอร์ กด Call → แสดง Alert "Call"/"Cancel"


