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 | |
struct HalfShape: Shape { | |
let left: Bool | |
func path(in rect: CGRect) -> Path { | |
return Path { path in | |
let width = rect.width | |
let height = rect.height |
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 | |
struct CircularEffect: AnimatableModifier { | |
var param: CGFloat | |
let count: Int | |
let radius: CGFloat | |
var animatableData: CGFloat { | |
get { return param } | |
set { param = newValue } | |
} | |
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
// | |
// Lightnings fun | |
// | |
// BEWARE highly unoptimized! | |
// | |
// Created by Pavel Zak on 30/11/2020. | |
// | |
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
// | |
// RotatorView.swift | |
// | |
// Created by Pavel Zak on 16/11/2020. | |
// original idea by: https://twitter.com/beesandbombs/status/1326312738033983489?s=20 | |
// | |
import SwiftUI | |
func pow(_ x: Int, _ y: Int) -> Int { |
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
// | |
// ContentView.swift | |
// SwiftUIWeeklyChallenge01 | |
// | |
// Created by @myridiphis on 02/10/2020. | |
// | |
// not very tidy, but enjoy changing many of magical constants | |
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
// | |
// Mixing custom AnimatableVector in AnimatablePair | |
// | |
// Created by Pavel Zak on 26/05/2020. | |
// Copyright © 2020 Pavel Zak. All rights reserved. | |
// | |
import SwiftUI | |
struct AnimatableVector2D: VectorArithmetic { | |
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
// | |
// AnimatableVector2D.swift | |
// | |
// this is derivation of generic AnimatableVector presented at: https://nerdyak.tech/development/2020/01/12/animating-complex-shapes-in-swiftui.html | |
// | |
// Created by Pavel Zak on 18/05/2020. | |
// | |
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
# example of a custom lldb command that prints Data as String | |
# store in your home (~) directory | |
command regex printData 's/(.+)/expr print(String(data: %1, encoding: .utf8))/' |
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
// | |
// AnimatableVector.swift | |
// | |
// usage and explanation at: https://nerdyak.tech/development/2020/01/12/animating-complex-shapes-in-swiftui.html | |
// | |
// Created by Pavel Zak on 10/01/2020. | |
// Copyright © 2020 Pavel Zak. All rights reserved. | |
// | |
import SwiftUI |