This file contains 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
TimelineView(.animation) { timeline in | |
let x = (sin(timeline.date.timeIntervalSince1970) + 1) / 2 | |
MeshGradient( | |
width: 3, | |
height: 3, | |
points: [ | |
[0.0, 0.0], [0.5, 0.0], [1.0, 0.0], | |
[0.0, 0.5], [Float(x), 0.5], [1.0, 0.5], | |
[0.0, 1.0], [0.5, 1.0], [1.0, 1.0] | |
], colors: [ |
This file contains 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
MeshGradient( | |
width: 3, | |
height: 3, | |
points: [ | |
[0.0, 0.0], [0.5, 0.0], [1.0, 0.0], | |
[0.0, 0.5], [0.5, 0.5], [1.0, 0.5], | |
[0.0, 1.0], [0.5, 1.0], [1.0, 1.0] | |
], colors: [ | |
.red, .red, .red, | |
.black, .red, .black, |
This file contains 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
// | |
// AKPageView.swift | |
// AKPageView | |
// | |
// Created by Ashish Kakkad on 31/08/23. | |
// | |
import SwiftUI | |
struct AKPageView: View { |
This file contains 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
// | |
// CardView.swift | |
// AKPageView | |
// | |
// Created by Ashish Kakkad on 31/08/23. | |
// | |
import SwiftUI | |
struct CardView: View { |
This file contains 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
extension UIView { | |
func preventScrollViewScreenshotRecursive() { | |
guard superview != nil else { | |
for subview in subviews { | |
subview.preventScrollViewScreenshotRecursive() | |
} | |
return | |
} | |
let guardTextField = UITextField() | |
guardTextField.backgroundColor = .red |
This file contains 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 | |
import ActivityKit | |
struct ContentView: View { | |
var body: some View { | |
VStack { | |
Image(systemName: "capsule") | |
.imageScale(.large) | |
.foregroundColor(.black) | |
Text("Hello, Dynamic Island!") |
This file contains 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
// | |
// LiveActivitySample.swift | |
// LiveActivitySample | |
// | |
// Created by Ashish Kakkad on 20/09/22. | |
// | |
import WidgetKit | |
import SwiftUI |
This file contains 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 ActivityKit | |
struct ActivityAttributesSample: ActivityAttributes { | |
public typealias Status = ContentState | |
public struct ContentState: Codable, Hashable { | |
var value: String | |
} | |
} |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>NSSupportsLiveActivities</key> | |
<true/> | |
</dict> | |
</plist> |
This file contains 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
// | |
// FirstView.swift | |
// PassDataSwiftUI | |
// | |
// Created by Kode on 24/08/22. | |
// | |
import SwiftUI | |
struct FirstView: View { |
NewerOlder