-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
14 changed files
with
249 additions
and
1,031 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
11 changes: 11 additions & 0 deletions
11
Demo/Demo macOS/Assets.xcassets/AccentColor.colorset/Contents.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"colors" : [ | ||
{ | ||
"idiom" : "universal" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// | ||
// ContentView.swift | ||
// Demo macOS | ||
// | ||
// Created by Fabrizio Duroni on 12.10.2024. | ||
// Copyright © 2024 Fabrizio Duroni. All rights reserved. | ||
// | ||
|
||
import SwiftUI | ||
import ID3TagEditor | ||
|
||
struct ContentView: View { | ||
@State private var tag: ID3Tag? | ||
|
||
var body: some View { | ||
VStack { | ||
if let validTag = tag { | ||
if let data = (validTag.frames[.attachedPicture(.frontCover)] as? ID3FrameAttachedPicture)?.picture, | ||
let validImage = NSImage(data: data) { | ||
Image(nsImage: validImage) | ||
.resizable() | ||
.frame(width: 200, height: 200) | ||
} | ||
Text((validTag.frames[.title] as? ID3FrameWithStringContent)?.content ?? "") | ||
Text((validTag.frames[.album] as? ID3FrameWithStringContent)?.content ?? "") | ||
Text((validTag.frames[.genre] as? ID3FrameGenre)?.description ?? "") | ||
} | ||
} | ||
.padding() | ||
.onAppear { | ||
let id3TagEditor = ID3TagEditor() | ||
tag = try? id3TagEditor.read(from: PathLoader().pathFor(name: "example", fileType: "mp3"))! | ||
} | ||
} | ||
} | ||
|
||
#Preview { | ||
ContentView() | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// | ||
// Demo_macOSApp.swift | ||
// Demo macOS | ||
// | ||
// Created by Fabrizio Duroni on 12.10.2024. | ||
// Copyright © 2024 Fabrizio Duroni. All rights reserved. | ||
// | ||
|
||
import SwiftUI | ||
|
||
@main | ||
struct Demo_macOSApp: App { | ||
var body: some Scene { | ||
WindowGroup { | ||
ContentView() | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
Demo/Demo macOS/Preview Content/Preview Assets.xcassets/Contents.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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