Skip to content

Instantly share code, notes, and snippets.

View wtpalexander's full-sized avatar

Will Alexander wtpalexander

View GitHub Profile
@wtpalexander
wtpalexander / PagerView.swift
Created March 10, 2021 15:32
Custom PagerView to replace PageTabViewStyle, that currently has performance issues with complex views. Originally created by @mecid (https://gist.github.com/mecid/e0d4d6652ccc8b5737449a01ee8cbc6f), I've changed the animation to work just like the PageTabViewStyle when changed using `withAnimation`.
//
// PagerView.swift
//
// Originally Created by Majid Jabrayilov on 12/5/19.
// Modified by Will Alexander on 10/3/2021
// Copyright © 2019 Majid Jabrayilov. All rights reserved.
// Copyright © 2020 appstrm. All rights reserved.
//
import SwiftUI