Web Analytics

PartitionKit

⭐ 242 stars Spanish by kieranb662

Partition Kit

partition kit logo

Recientemente destacado en Top 10 Bibliotecas de Android y iOS más populares en octubre y en 5 bibliotecas iOS para mejorar tu aplicación!

grid

¿Qué es PartitionKit?

¿Qué no es PartitionKit?

Requisitos

PartitionKit por defecto requiere que el Framework SwiftUI esté operativo, por lo que solo se soportan estas plataformas:

Cómo agregarlo a tu proyecto

Tutorial en menos de 2 minutos

Video tutorial: Cómo usar PartitionKit

Cómo usar

Partición Vertical

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

Partición Horizontal

  • Decida qué vista desea tener en la Izquierda, cuál desea tener en la Derecha y opcionalmente un Mango para usar para arrastrar las particiones a diferentes tamaños.
  • Haga Esto
Swift HPart(left: { MyLeftView() }, right: { MyRightView() }) { MyHandle() }

GridPartition

  • Decida qué Vistas irán en cada esquina TopLeft, TopRight, BottomLeft, BottomRight y opcionalmente un Handle para que el usuario pueda arrastrar y cambiar el tamaño de las vistas.
  • Haga esto
Swift GridPart(topLeft: { MyTopLeftView() }, topRight: { MyTopRightView() }, bottomLeft: { MyBottomLeftView() }, bottomRight: { MyBottomRightView() }) { MyHandle() }
## Ejemplos 

Copia y pega esto. He añadido imágenes con nombre para mostrar cómo deberían verse las vistas, estoy usando modo oscuro, por lo que los colores del modo claro pueden verse diferentes.

| 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() } } `

Pendiente

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