Skip to content

Instantly share code, notes, and snippets.

//
// CustomRecordingTipView.swift
// VoiceChat
//
// Created by Amos Gyamfi on 20.2.2024.
//
import SwiftUI
import TipKit
@amosgyamfi
amosgyamfi / HelloAnimation.swift
Last active March 5, 2024 02:28
HelloAnimation.swift
//
// HelloAnimation.swift
// OpenvisionOS
//
// Created by Amos Gyamfi on 17.2.2024.
//
import SwiftUI
struct HelloAnimation: View {
//
// VisionPro3DRotation.swift
// OpenvisionOS
//
// Created by Amos Gyamfi on 16.2.2024.
//
import SwiftUI
import RealityKit
//
// FreeFormDrawingView.swift
// PKDraw
import SwiftUI
import PencilKit
struct FreeFormDrawingView: View {
@State private var canvas = PKCanvasView()
//
// IncomingCall.swift
// Incoming Call Animation
import SwiftUI
struct IncomingCall: View {
@State private var isCalling = false
@amosgyamfi
amosgyamfi / CreateRectangularShapes.swift
Created December 25, 2023 04:38
Create different types of rectangular shapes in SwiftUI
//
// CreateRectangularShapes.swift
// ThousandDaysOfSwiftUI
import SwiftUI
struct CreateRectangularShapes: View {
var body: some View {
NavigationStack {
import React from 'react';
import { StreamCall, StreamVideo, StreamVideoClient, User } from '@stream-io/video-react-native-sdk';
import { useCall, useCallStateHooks, useIncallManager, VideoRenderer } from '@stream-io/video-react-native-sdk';
import { Button, Text, View, StyleSheet, SafeAreaView } from 'react-native';
const apiKey = 'hd8szvscpxvd'; // the API key can be found in the "Credentials" section
const token = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiTWFyYV9KYWRlIiwiaXNzIjoiaHR0cHM6Ly9wcm9udG8uZ2V0c3RyZWFtLmlvIiwic3ViIjoidXNlci9NYXJhX0phZGUiLCJpYXQiOjE3MDI0NTQwMDQsImV4cCI6MTcwMzA1ODgwOX0.ERKM-3w-YqiubkxY_3SGvLQs85RUshJcKN-AkiJc8hg'; // the token can be found in the "Credentials" section
const userId = 'Mara_Jade'; // the user id can be found in the "Credentials" section
const callId = 'qovA6tXL837X'; // the call id can be found in the "Credentials" section
import React from 'react';
import { StreamCall, StreamVideo, StreamVideoClient, User } from '@stream-io/video-react-native-sdk';
import { SafeAreaView, Text, StyleSheet, View, Image } from 'react-native';
const apiKey = ''; // the API key can be found in the "Credentials" section
const token = ''; // the token can be found in the "Credentials" section
const userId = ''; // the user id can be found in the "Credentials" section
const callId = ''; // the call id can be found in the "Credentials" section
// Initialize the user object. The user can be anonymous, guest, or authenticated
import React, { useState } from 'react';
import { Animated, TouchableOpacity, View, StyleSheet } from 'react-native';
const AnimationCompletionCriteria = () => {
const scaleRotate = useState(new Animated.Value(0))[0];
const rotation = scaleRotate.interpolate({
inputRange: [0, 1],
outputRange: ['0deg', '-45deg'],
});
import React, { useState, useRef } from 'react';
import { View, TouchableOpacity, Animated, StyleSheet } from 'react-native';
const RootStack = createStackNavigator(
{
Hamburger: StateChange, // Assuming StateChange is the component in Hamburger.js
Home: HomeScreen,
},
{
initialRouteName: "Hamburger"