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 WatchConnectivity | |
struct CurrentSongView: View { | |
@EnvironmentObject var songInfoReceiver: SongInfoReceiver | |
@State var t: Float = 0.0 | |
@State var timer: Timer? | |
var body: some View { | |
NavigationStack { |
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
#!/usr/bin/env ruby | |
toc = "# Table of Contents\n" | |
newmd = "" | |
ARGF.each_line do |line| | |
newmd << line | |
next if !line.start_with?("#") | |
heading = line.gsub("#", "").strip |
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
// | |
// AnimatedMeshView.swift | |
// Fussion | |
// | |
// Created by Rudrank Riyam on 11/06/24. | |
// | |
import Foundation | |
import MusicKit | |
import ColorKit |
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
[ | |
{ "name": "Burj Khalifa", "city": "Dubai", "country": "United Arab Emirates", "height": 828, "yearBuilt": 2010, "latitude": 25.186016587, "longitude": 55.275198221 }, | |
{ "name": "Shanghai Tower", "city": "Shanghai", "country": "China", "height": 632, "yearBuilt": 2015, "latitude": 31.226676271, "longitude": 121.501873778 } | |
] |
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 ContentView: View { | |
@StateObject private var viewModel = HomeViewModel() | |
@Environment(\.openURL) var openURL | |
var body: some View { | |
NavigationView { | |
VStack { | |
List { |
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
struct ArtworkImage<Content>: View where Content: View { | |
private let url: URL? | |
private var content: (_ image: Image) -> Content | |
public init(url: URL?, @ViewBuilder content: @escaping (_ image: Image) -> Content) { | |
self.url = url | |
self.content = content | |
} | |
var body: some 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
import SwiftUI | |
struct ShazamMusicRow: View { | |
var item: SHMediaItem | |
var body: some View { | |
ZStack { | |
ArtworkImage(url: item.artworkURL) { image in | |
image | |
.scaledToFill() |
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 ShazamMusicCard: View { | |
var item: SHMediaItem | |
var body: some View { | |
HStack { | |
ArtworkImage(url: url) { image in | |
image | |
.scaledToFit() |
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
public func addToShazamLibrary() { | |
SHMediaLibrary.default.add(mediaItems) { error in | |
if let error = error { | |
print(error) | |
} else { | |
let generator = UINotificationFeedbackGenerator() | |
generator.notificationOccurred(.success) | |
} | |
} | |
} |
NewerOlder