Skip to content

Instantly share code, notes, and snippets.

View valvoline's full-sized avatar

Costantino Pistagna valvoline

View GitHub Profile
@valvoline
valvoline / CustomSegmentedView.swift
Created August 25, 2025 16:59
A simple custom segmented control written in SwiftUI
import SwiftUI
struct SegmentedItem: Identifiable, Hashable {
var id: UUID = UUID()
var name: String
var description: String {
name.capitalized
}
init(_ name: String) { self.name = name }
}
@valvoline
valvoline / Carousel.swift
Last active August 17, 2025 07:23
Un carosello interattivo con zoom e scrollTransition in SwiftUI ed Xcode26
@valvoline
valvoline / BorderLineLoadingView.swift
Created August 13, 2025 21:38
A simple card with loading bar on border.
import SwiftUI
struct BorderLineLoadingView: View {
@State private var rotation: Double = 0
var animate = false
var cornerRadius: Double = 20
var speed: Double = 2
var strokeWidth: Double = 3
var startColor: Color = .red
//
// CacheAsyncImage.swift
//
// Created by Costantino Pistagna on 08/02/23.
//
// Updated on 31/08/2025: This gist is really old. If you still need
// an easy drop-in replacement for AsyncImage, please check out my
// current SPM at:
//
// https://github.com/valvoline/CachedAsyncImage
@valvoline
valvoline / SplashScrollView.swift
Created March 26, 2021 11:52
A simple Parallax Effect based paged ScrollView
//
// ContentView.swift
// Shared
//
// Created by Costantino Pistagna on 25/03/21.
//
import SwiftUI
struct ContentView: View {
//
// CustomSlider.swift
// Custom SliderView using SwiftUI
//
// Created by Costantino Pistagna on 02/07/2020.
//
import SwiftUI
struct ContentView: View {
//
// ContentView.swift
// neumorph
//
// Created by Costantino Pistagna on 28/06/2020.
//
import SwiftUI
struct ContentView: View {
//
// FakeBeacon.h
//
// Created by Costantino Pistagna on 02/05/2020.
// Copyright © 2020 Sofapps. All rights reserved.
//
#import <Foundation/Foundation.h>
@import CoreLocation;
//
// SAWKWebView.swift
//
// Created by Costantino Pistagna on 24/01/2020.
// Copyright © 2020 Sofapps. All rights reserved.
//
import UIKit
import WebKit
//
// ContentView.swift
// TestSwiftUI
//
// Created by valv0 on 05/06/2019.
// Copyright © 2019 Costantino Pistagna. All rights reserved.
//
import SwiftUI