π»
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct HomeView: View { | |
@State private var isSheetPresented = true | |
@State private var textInput: String = "" | |
@State private var tapCount = 0 | |
var body: some View { | |
ZStack { | |
Color.purple |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Node { | |
var value: Int | |
var next: Node? | |
init(value: Int, next: Node?) { | |
self.value = value | |
self.next = next | |
} | |
convenience init(value: Int) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protocol Operations { | |
associatedtype ItemType | |
func operation(arg1: ItemType, arg2: ItemType) -> ItemType | |
} | |
struct MathAddition: Operations { | |
func operation(arg1: Int, arg2: Int) -> Int { | |
return arg1 + arg2 | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct HCardsScrollView: View { | |
let colorSets: [Color] = [ | |
.red, .green, .blue, | |
.yellow, .purple, .pink, | |
.accentColor, .black, .brown, | |
.cyan, .indigo, .teal, | |
.orange, .mint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Spiral.swift | |
// ShapeAnimation | |
// | |
// Created by Vishal Paliwal on 27/06/23. | |
// | |
import SwiftUI | |
struct SpiralView: View { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
/*: | |
For more information, see [Simplest Snap Card Carousal In SwiftUI.](https://medium.com/@iamvishal16/simplest-snap-card-carousal-in-swiftui-e6a4395d487b) | |
*/ | |
struct SnapCarouselView: View { | |
@State private var currentIndex: Int = 0 | |
let cards: [Card] = [ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// CirclesView.swift | |
// ShapeAnimation | |
// | |
// Created by Vishal Paliwal on 04/04/23. | |
// | |
import SwiftUI | |
struct CirclesView: View { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ContentView.swift | |
// ShapesFun | |
// | |
// Created by Vishal Paliwal on 09/04/23. | |
// | |
import SwiftUI | |
struct ContentView: View { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// OptimisedTriangleAnim.swift | |
// ShapesFun | |
// | |
// Created by Vishal Paliwal on 22/01/23. | |
// | |
import SwiftUI | |
struct OptimisedTriangleAnim: View { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// MultiTriangleAnimView.swift | |
// ShapesFun | |
// | |
// Created by Vishal Paliwal on 09/04/23. | |
// | |
import SwiftUI | |
struct MultiTriangleAnimView: View { |
NewerOlder