Changed the layout of the image to be a bit more UI friendly
Changelog-Changed: Show rounded corners on inline images
This commit is contained in:
committed by
William Casarin
parent
898a880a15
commit
4a83d370d2
@@ -121,21 +121,25 @@ struct ImageCarousel: View {
|
|||||||
var body: some View {
|
var body: some View {
|
||||||
TabView {
|
TabView {
|
||||||
ForEach(urls, id: \.absoluteString) { url in
|
ForEach(urls, id: \.absoluteString) { url in
|
||||||
KFAnimatedImage(url)
|
Rectangle()
|
||||||
.configure { view in
|
.overlay {
|
||||||
view.framePreloadCount = 3
|
KFAnimatedImage(url)
|
||||||
|
.configure { view in
|
||||||
|
view.framePreloadCount = 3
|
||||||
|
}
|
||||||
|
.cacheOriginalImage()
|
||||||
|
.loadDiskFileSynchronously()
|
||||||
|
.scaleFactor(UIScreen.main.scale)
|
||||||
|
.fade(duration: 0.1)
|
||||||
|
.aspectRatio(contentMode: .fill)
|
||||||
|
.tabItem {
|
||||||
|
Text(url.absoluteString)
|
||||||
|
}
|
||||||
|
.id(url.absoluteString)
|
||||||
}
|
}
|
||||||
.cacheOriginalImage()
|
|
||||||
.loadDiskFileSynchronously()
|
|
||||||
.scaleFactor(UIScreen.main.scale)
|
|
||||||
.fade(duration: 0.1)
|
|
||||||
.aspectRatio(contentMode: .fit)
|
|
||||||
.tabItem {
|
|
||||||
Text(url.absoluteString)
|
|
||||||
}
|
|
||||||
.id(url.absoluteString)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.cornerRadius(10)
|
||||||
.sheet(isPresented: $open_sheet) {
|
.sheet(isPresented: $open_sheet) {
|
||||||
ImageViewer(urls: urls)
|
ImageViewer(urls: urls)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user