Supabase - ~52K stars
- Designed explicitly as an open source firebase alternative
- Typescript based
- Docker support
Appwrite - ~32K stars
- Written in JavaScript and PHP
- Docker based
- Realtime support across all services
| import SwiftUI | |
| struct SegmentedView<Segment: Hashable & CustomStringConvertible>: View { | |
| struct Config { | |
| var tint: Color = .green | |
| var inactiveColor: Color = Color(.systemGray) | |
| var font: Font = .footnote.weight(.medium) | |
| var underlineHeight: CGFloat = 4 | |
| var spacing: CGFloat = 6 |
| extension StringProtocol { | |
| subscript(_ offset: Int) -> String.Element { | |
| if offset >= 0 { | |
| self[index(startIndex, offsetBy: offset)] | |
| } else { | |
| self[index(endIndex, offsetBy: offset)] | |
| } | |
| } | |
| import SwiftUI | |
| private struct OnLoad: ViewModifier { | |
| let action: () -> Void | |
| @State private var loaded = false | |
| func body(content: Content) -> some View { | |
| content.onAppear { | |
| if !loaded { | |
| loaded = true |
| import SwiftUI | |
| private struct OnFirstAppear: ViewModifier { | |
| let perform: () -> Void | |
| @State private var firstTime = true | |
| func body(content: Content) -> some View { | |
| content.onAppear { | |
| if firstTime { |
| import Foundation | |
| import HealthKit | |
| struct WorkoutSplit: Hashable { | |
| let label: String | |
| let distance: HKQuantity | |
| let duration: TimeInterval | |
| } | |
| extension WorkoutSplit { |
| import Foundation | |
| import HealthKit | |
| struct WorkoutSplit: Hashable { | |
| let label: String | |
| let distance: HKQuantity | |
| let duration: TimeInterval | |
| } | |
| extension WorkoutSplit { |
| import UIKit | |
| extension UIView { | |
| /* Usage Example | |
| * bgView.addBottomRoundedEdge(desiredCurve: 1.5) | |
| */ | |
| func addBottomRoundedEdge(desiredCurve: CGFloat?) { |
| // | |
| // ContentSizePagingCollectionDelegate.swift | |
| // CardsCarousel | |
| // | |
| // Created by Daniel Carlos Souza Carvalho on 2/20/21. | |
| // | |
| import UIKit | |
| /// Horizontal paging for collections based on the content size |