Skip to content

Instantly share code, notes, and snippets.

View CodeSlicing's full-sized avatar
😎
Busy feeling awesome

CodeSlicing

😎
Busy feeling awesome
View GitHub Profile
@CodeSlicing
CodeSlicing / StickyDrag.swift
Created January 10, 2020 11:08
SwiftUI example showing a sticky state drag with spring animations
//
// StickyDrag.swift
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
// of the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
@CodeSlicing
CodeSlicing / TwoStateStickyDrag.swift
Last active January 11, 2020 01:21
SwiftUI stick dragging with two states
//
// TwoStateStickyDrag.swift
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
// of the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
@CodeSlicing
CodeSlicing / OffsetToPositionDemo.swift
Last active September 21, 2023 01:07
Demonstrates the use of offsetToPosition modifier
//
// OffsetToPositionDemo.swift
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
// of the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
@CodeSlicing
CodeSlicing / RelativeOffsetDemo.swift
Last active January 18, 2020 11:12
Demonstrates the use of relativeOffset modifier
//
// RelativeOffsetDemo.swift
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
// of the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
@CodeSlicing
CodeSlicing / GridViewDemo.swift
Created January 18, 2020 11:13
Demo showing a grid view layout utility
//
// GridViewDemo.swift
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
// of the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
@CodeSlicing
CodeSlicing / GradientPickerDemo.swift
Created January 22, 2020 22:53
Animates a gradient behind a picker to indicate the severity of the choice
//
// GradientPickerDemo.swift
// DemoGists
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
// of the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
@CodeSlicing
CodeSlicing / ConcentricArcsDemo.swift
Created January 23, 2020 23:29
Demo showing animating concentric arcs on a timer without pulsing with the timer duration
//
// ConcentricArcsDemo.swift
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
// of the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
@CodeSlicing
CodeSlicing / ColorBasedOnSizeDemo.swift
Last active January 25, 2020 19:43
Example of how GradientMap can be used to control the color of a view dependent on its size
//
// ColorBasedOnSizeDemo.swift
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
// of the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
@CodeSlicing
CodeSlicing / PickerSeverityDemo.swift
Last active January 25, 2020 00:57
Demo showing how to use GradientMap to modify the background of a picker to indicate severity of selection
//
// PickerSeverityDemo.swift
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
// of the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
@CodeSlicing
CodeSlicing / LayoutGuideShieldDemo.swift
Last active September 19, 2021 20:06
Demo showing the use of polar layout guides to create star detail shapes in Captain America's shield
//
// CaptainAmericaShieldDemo.swift
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
// of the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//