Skip to content

Instantly share code, notes, and snippets.

View ChristianVinterly's full-sized avatar

Christian Vinterly ChristianVinterly

View GitHub Profile
@mralexhay
mralexhay / SwiftUI Tagger.swift
Last active March 11, 2024 06:35
A SwiftUI interface for adding tags
//
// TaggerView.swift
//
// Created by Alex Hay on 21/11/2020.
//
// Simple interface for adding tags to an array in SwiftUI
// Example video: https://imgur.com/gallery/CcA1IXp
// alignmentGuide code from Asperi @ https://stackoverflow.com/a/58876712/11685049
import SwiftUI
@jfuellert
jfuellert / ScrollableView.swift
Last active June 7, 2024 02:55
A scrollable SwiftUI view, UIScrollView wrapper. ScrollableView lets you read and write content offsets for scrollview in SwiftUI, with and without animations.
import SwiftUI
struct ScrollableView<Content: View>: UIViewControllerRepresentable, Equatable {
// MARK: - Coordinator
final class Coordinator: NSObject, UIScrollViewDelegate {
// MARK: - Properties
private let scrollView: UIScrollView
var offset: Binding<CGPoint>
@timothycosta
timothycosta / UIScrollViewWrapper.swift
Created July 5, 2019 03:25
UIScrollView wrapped for SwiftUI
//
// UIScrollViewWrapper.swift
// lingq-5
//
// Created by Timothy Costa on 2019/07/05.
// Copyright © 2019 timothycosta.com. All rights reserved.
//
import SwiftUI