Skip to content

Instantly share code, notes, and snippets.

View strzempa's full-sized avatar

Patryk Strzemiecki strzempa

View GitHub Profile
@ethanhuang13
ethanhuang13 / FacebookAuth.swift
Last active October 3, 2024 12:26
FacebookAuth is for iOS app developers who need to support Facebook login but don't want to use the official SDK
//
// FacebookAuth.swift
// GitHub: ethanhuang13
// Twitter: @ethanhuang13
import AuthenticationServices
import SafariServices
/*
Updated:
@Kievkao
Kievkao / SwiftUI-ScrollView-offset.swift
Created September 9, 2020 07:09
How to get ScrollView offset in SwiftUI
struct ContentView: View {
var body: some View {
ScrollViewOffset(onOffsetChange: { (offset) in
print("New ScrollView offset: \(offset)")
}) {
VStack {
ForEach(0..<100) { index in
Text("\(index)")
}
}
@peterfriese
peterfriese / Color+Codable.swift
Created March 19, 2021 11:00
Making Swift's Color codable
//
// Color+Codable.swift
// FirestoreCodableSamples
//
// Created by Peter Friese on 18.03.21.
//
import SwiftUI
// Inspired by https://cocoacasts.com/from-hex-to-uicolor-and-back-in-swift