Web Analytics

PartitionKit

⭐ 242 stars Japanese by kieranb662

Partition Kit

partition kit logo

最近10月の注目のAndroidおよびiOSライブラリトップ10アプリを強化する5つのiOSライブラリで紹介されました!

grid

PartitionKitとは?

PartitionKitがではないもの?

要件

PartitionKitはデフォルトでSwiftUIフレームワークの動作を必要とするため、以下のプラットフォームのみ対応しています:

プロジェクトへの追加方法

2分未満のチュートリアル動画

チュートリアル動画: PartitionKitの使い方

使い方

垂直パーティション

`` Swift VPart(top: { MyTopView() }, bottom: { MyBottomView() }) { MyHandle() }

水平方向のパーティション

  • に表示したいビュー、 に表示したいビュー、およびオプションでパーティションのサイズを変更するために使用する ハンドル を決定します。
  • これを行います。
Swift HPart(left: { MyLeftView() }, right: { MyRightView() }) { MyHandle() }

GridPartition

  • 各コーナーに配置するビューを決定します:TopLeftTopRightBottomLeftBottomRight、およびオプションでユーザーがビューをドラッグしてサイズ変更できるようにするための Handle
  • これを行います。
Swift GridPart(topLeft: { MyTopLeftView() }, topRight: { MyTopRightView() }, bottomLeft: { MyBottomLeftView() }, bottomRight: { MyBottomRightView() }) { MyHandle() }

以下をコピーして貼り付けてください。ビューの見た目のために名前付き画像を追加しました。私はダークモードを使用しているため、ライトモードの色は異なる場合があります。

| HPart | VPart | GridPart | NestGrids | Mixed | |-------------------------|-------------------------|-------------------------------|----------------------------------------|-----------------------------| | HPart | VPart | GridPart | Nested Grid | Mixed |

Swift import SwiftUI import PartitionKit

struct ContentView: View { var vExample: some View { VPart(top: { RoundedRectangle(cornerRadius: 25).foregroundColor(.purple) }) { Circle().foregroundColor(.yellow) } } var hExample: some View { HPart(left: { RoundedRectangle(cornerRadius: 10).foregroundColor(.blue) }) { Circle().foregroundColor(.orange) } } var nestedExample: some View { VPart(top: { hExample }) { vExample } } var gridExample: some View { GridPart(topLeft: { RoundedRectangle(cornerRadius: 25).foregroundColor(.purple) }, topRight: { Circle().foregroundColor(.yellow) }, bottomLeft: { Circle().foregroundColor(.green) }) { RoundedRectangle(cornerRadius: 25).foregroundColor(.blue) } } var nestedGridsExample: some View { GridPart(topLeft: { gridExample }, topRight: { gridExample }, bottomLeft: { gridExample }) { gridExample } } var body: some View { nestedExample } }

struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() } } `

Todo

--- Tranlated By Open Ai Tx | Last indexed: 2026-05-11 ---