badwolf4815162342 / WGApp

1 stars 0 forks source link

Bilder-Ordner aus Assets laden #24

Open lSummerl opened 6 years ago

lSummerl commented 6 years ago

Alle Bilder aus dem Iconbilder Ordner der Assets laden.

irgendwie so:

if let path = Bundle.main.path(forResource: "assets/test", ofType: "json") { let data = try Data(contentsOf: URL(fileURLWithPath: path), options: .alwaysMapped) let jsonObj = JSON(data: data) }

https://stackoverflow.com/questions/41485128/what-can-i-do-whether-add-images-to-assets-or-in-folder-in-ios

leider funktioniert der vorgeschlagene code nicht

lSummerl commented 6 years ago

Alle Bilder in eine Datei? So könnte json file entstehen

lSummerl commented 6 years ago

https://developer.apple.com/documentation/uikit/uiimageasset?changes=_4

https://medium.com/swiftly-swift/the-secret-of-storing-and-loading-uiimage-s-48e94d080c8d