Framework フレームワーク

SwiftUI

Declare the user interface and behavior for your app on every platform. ユーザインターフェイスと挙動をあなたのアプリに対してあらゆるプラットホーム上で宣言します。

Overview 概要

SwiftUI provides views, controls, and layout structures for declaring your app’s user interface. The framework provides event handlers for delivering taps, gestures, and other types of input to your app, and tools to manage the flow of data from your app’s models down to the views and controls that users will see and interact with. SwiftUIは、ビュー、コントロール、そしてレイアウト構造体を、あなたのアプリのユーザインターフェイスを宣言するために提供します。このフレームワークは、タップ、ジェスチャ、および他の種類の入力をあなたのアプリに届けるイベントハンドラ、そしてあなたのアプリのもつモデルからビューとコントロールへ至るデータの流れを管理するツールを提供します。

Define your app structure using the App protocol, and populate it with scenes that contain the views that make up your app’s user interface. Create your own custom views that conform to the View protocol, and compose them with SwiftUI views for displaying text, images, and custom shapes using stacks, lists, and more. Apply powerful modifiers to built-in views and your own views to customize their rendering and interactivity. Share code between apps on multiple platforms with views and controls that adapt to their context and presentation. あなたのアプリの構造をAppプロトコルを使って定義してください、そしてそれをさまざまなシーンで満たしてください、それらはさまざまなビューを含み、それらはあなたのアプリのユーザインターフェイスを作り上げます。あなた独自のあつらえのビューを作成してください、それらはViewプロトコルに準拠するものです、そしてそれらをSwiftUIビューと構成してください、テキスト、画像、そしてあつらえの形状を、スタック、リスト、その他いろいろを使って表示するために。パワフルな修飾子を、組み込みビューおよびあなた独自のビューに適用して、それらの描出と相互作用性をカスタマイズしてください。コードを複数のプラットホーム上のアプリそれらの間で共有してください、それらの文脈および提示に合わせて変化するビューとコントロールとともに。

An illustration of an app built using SwiftUI running on the Mac, iPhone, and Apple Watch.

You can integrate SwiftUI views with objects from the UIKit, AppKit, and WatchKit frameworks to take further advantage of platform-specific functionality. You can also customize accessibility support in SwiftUI, and localize your app’s interface for different languages, countries, or cultural regions. あなたは、SwiftUIビューとUIKit、AppKit、そしてWatchKitフレームワークのさまざまなオブジェクトを統合することで、プラットホーム特有の機能性をさらに利用できます。あなたはまた、アクセシビリティサポートをSwiftUIにおいてカスタマイズできます、そしてアプリのもつインターフェイスを異なる言語、国、または文化圏に対してローカライズできます。

Topics 話題

Essentials 要点

App Structure

User Interface Elements

View Containers

Framework Integration フレームワーク統合

Interactivity

Tool Support