Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> การเขียนโปรแกรม >> iOS

ขนาดและ Radius ที่แน่นอนของ iPhone App Icons

ทุก iOS App ต้องมี App Icon หลายขนาด สำหรับ Home Screen, Spotlight, Settings, Notification, App Store

กฎทั่วไป

  • Format: PNG (ไม่รองรับ JPEG)
  • ไม่มี Transparency (Alpha channel = 100%)
  • Square ไม่มี Round Corners (ระบบจะทำมุมโค้งให้อัตโนมัติ)
  • App Store Icon: 1024×1024 px (จำเป็น)

ขนาด Icon ทั้งหมด (Points × Scale = Pixels)

Icon Type1x2x3x
App Store--1024×1024
iPhone App (Home)60×60120×120180×180
iPad App (Home)76×76152×152167×167 (Pro)
Spotlight Search40×4080×80120×120
Settings29×2958×5887×87
Notification20×2040×4060×60
iPad Pro App Store-167×167-

Asset Catalog (Xcode) - วิธีที่แนะนำ

  1. เปิด Assets.xcassets
  2. เลือก AppIcon
  3. ลากรูปภาพลงในช่อง (Well) ที่ตรงขนาด
  4. Xcode จะจัดการ Scaling และ Naming ให้อัตโนมัติ

ขนาดที่ต้องเติมขั้นต่ำ (iOS 13+)

ปัจจุบัน 1x ไม่จำเป็นแล้ว (Retina Only) ต้องเติม:

  • App Store: 1024×1024 (1x สำหรับ App Store Connect)
  • iPhone: 120×120 (2x), 180×180 (3x)
  • iPad: 152×152 (2x), 167×167 (2x Pro)
  • Spotlight: 80×80 (2x), 120×120 (3x)
  • Settings: 58×58 (2x), 87×87 (3x)
  • Notification: 40×40 (2x), 60×60 (3x)

เครื่องมือช่วย

  • App Icon Generator: appicon.co, makeappicon.com
  • Figma/Sketch Plugin: "iOS App Icon Generator"
  • Fastlane: fastlane deliver หรือ fastlane produce

Corner Radius

Apple ใช้สูตร: Radius = Width × 0.225 (ประมาณ 22.5%)

  • 180px → Radius ~40px
  • 120px → Radius ~27px
  • 1024px → Radius ~230px

ไม่ต้องทำมุมโค้งเอง ระบบจะ Mask ให้อัตโนมัติ