Skip to content

Instantly share code, notes, and snippets.

View jtvargas's full-sized avatar
✍️
working on something...

Jonathan Taveras jtvargas

✍️
working on something...
View GitHub Profile
struct TabBar: View {
@State private var selectedTab: Tab = .overview
@Namespace private var ns
enum Tab {
case overview, data, graphs, settings
}
var body: some View {
@rudrankriyam
rudrankriyam / AnimatedMeshView.swift
Created June 12, 2024 22:54
Creating animated music background using SwiftUI's new MeshGradient
//
// AnimatedMeshView.swift
// Fussion
//
// Created by Rudrank Riyam on 11/06/24.
//
import Foundation
import MusicKit
import ColorKit
@juliensagot
juliensagot / VariableBlurView.swift
Last active September 17, 2024 11:21
SwiftUI variable blur view
import Foundation
import SwiftUI
import UIKit
extension UIBlurEffect {
public static func variableBlurEffect(radius: Double, imageMask: UIImage) -> UIBlurEffect? {
let methodType = (@convention(c) (AnyClass, Selector, Double, UIImage) -> UIBlurEffect).self
let selectorName = ["imageMask:", "effectWithVariableBlurRadius:"].reversed().joined()
let selector = NSSelectorFromString(selectorName)
import { StatusBar } from "expo-status-bar";
import React, { useState } from "react";
import {
FlatList,
View,
Text,
Image,
StyleSheet,
SafeAreaView,
useWindowDimensions,
@yovany-lg
yovany-lg / expo-typescript-eslint-prettier.md
Last active September 14, 2024 19:52
Setting up React Navite: Expo + Typescript + Eslint (Airbnb) + Prettier

Steps to get started with Expo, Typescript, ESLint and Prettier

The first step is to use the Expo CLI to initialize the project. If you don't have the latest version of the Expo CLI tool, (or you don't have it installed) run npm install -g expo-cli.

Now run the following commands in the same order:

  • expo init my-app -t expo-template-blank-typescript
  • npx install-peerdeps --dev eslint-config-airbnb
  • npm i --save-dev @typescript-eslint/parser @typescript-eslint/eslint-plugin
  • npm i --save-dev prettier eslint-config-prettier eslint-plugin-prettier

Create or edit the file .eslintrc.json with the following content: