Swift uchun macOSda ushlab turish yaratish uchun siz maxsus NSWindow va NSView-dan foydalanishingiz mumkin. Quyidagi misol qanday qilib Swiftda ushlab turish oynasini macOS bilan yaratishni ko'rsatadi: Xcode-da yangi Cocoa App loyihasini yarating. Quyidagi kod bilan yangi Swift faylini qo'shing: swift import Cocoa sinfi Ushlab turish oynasi: NSWindow { override init(contentRect: NSRect, styleMask style: NSWindow.StyleMask, backing backingStoreType: NSW.BackingStoreType, defer flag: Bool) { super.init(contentRect content:Rect, styleMask: NSRect, backing backing: backingStoreType, defer flag: Bool) { super.init.init.info }.Rect
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence