Skip to content

Instantly share code, notes, and snippets.

@MoussaHellal
MoussaHellal / wave.swift
Created January 24, 2024 11:22
Provides a Wave Animation
import SwiftUI
struct ContentView: View {
/// The percentage value controlling the wave animation.
@State private var percent: CGFloat = 60.0
/// The linear gradient defining the color of the wave.
@State private var color = LinearGradient(colors: [.cyan, .cyan.opacity(0.5)], startPoint: .top, endPoint: .bottom)
var body: some View {
VStack {
@MoussaHellal
MoussaHellal / RingAnimation.swift
Created January 23, 2024 11:51
RingAnimation
//
// ContentView.swift
// Animating Cirlce
//
// Created by Moussa on 23/1/2024.
//
import SwiftUI

SSH keypair setup for GitHub (or GitHub/GitLab/BitBucket, etc, etc)

Create a repo.

Make sure there is at least one file in it (even just the README.md)

Generate a SSH key pair (private/public):

ssh-keygen -t rsa -C "your_email@example.com"
@MoussaHellal
MoussaHellal / DrinkyFlow.swift
Created June 25, 2023 11:25
DrinkyFlow.swift Our main flow object that will handle navigation, holding passable data and Back to root and previous view
//
// DrinkyFlow.swift
// CompleteNavigationSwiftUI
//
// Created by Moussa on 25/6/2023.
//
import Foundation
import SwiftUI
@MoussaHellal
MoussaHellal / DrinkyViewFactory.swift
Created June 25, 2023 11:19
Our navigation setter in Drinky
//
// DrinkyViewFactory.swift
// CompleteNavigationSwiftUI
//
// Created by Moussa on 25/6/2023.
//
import Foundation
import SwiftUI
@MoussaHellal
MoussaHellal / DrinkyNavigation.swift
Created June 25, 2023 11:16
Enum to handle navigation cases for Drinky project
//
// DrinkyNavigation.swift
// CompleteNavigationSwiftUI
//
// Created by Moussa on 25/6/2023.
//
import Foundation
enum DrinkyNavigation {
@MoussaHellal
MoussaHellal / SafeAreaTabBar+Extensions
Created June 11, 2023 10:06
Getting SafeArea, TabBar Sizes in SwiftUI
//
// SafeAreaTabBar+Extension.swift
// SafeAreTabBar
//
// Created by Moussa on 11/6/2023.
//
import SwiftUI
extension UITabBarController {
@MoussaHellal
MoussaHellal / ContentView.swift
Created May 20, 2023 11:01
ContentView.swift
// Created by Moussa on 20/5/2023.
import SwiftUI
struct ContentView: View {
var body: some View {
VStack {
Image("cappucino")
.resizable()
@MoussaHellal
MoussaHellal / DraggableModifier.swift
Last active May 20, 2023 11:04
DraggableModifier.swift
// Created by Moussa on 20/5/2023.
import SwiftUI
struct DraggableModifier: ViewModifier {
@State private var offset = CGSize.zero
func body(content: Content) -> some View {
content
@MoussaHellal
MoussaHellal / draggableImage.swift
Last active May 20, 2023 10:32
draggable shadowed Image
// Created by Moussa on 20/5/2023.
import SwiftUI
struct ContentView: View {
@State private var offset = CGSize.zero
var body: some View {