Skip to content

Instantly share code, notes, and snippets.

import SwiftUI
// Adapted from: https://stackoverflow.com/questions/62102647/swiftui-hstack-with-wrap-and-dynamic-height/62103264#62103264
struct WrappingHStack<Model, V>: View where Model: Hashable, V: View {
typealias ViewGenerator = (Model) -> V
var models: [Model]
var isScrollView: Bool
var viewGenerator: ViewGenerator
var horizontalSpacing: CGFloat = 2
# Uncomment the next line to define a global platform for your project
platform :ios, '13.2'
target 'App' do
# Comment the next line if you don't want to use dynamic frameworks
use_frameworks!
# Tool to enforce Swift style and conventions.
# https://realm.github.io/SwiftLint
pod 'SwiftLint'