Skip to content

Commit

Permalink
优化 一些UI细节
Browse files Browse the repository at this point in the history
  • Loading branch information
aruis committed Aug 11, 2023
1 parent f88e86f commit 873c197
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions BookTime/View/Statistics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,10 @@ struct Statistics: View {
)
.shadow(color: Color( "image.border"), radius: 5,x:2,y:2)
.onTapGesture(perform: {
// selectBookIndex = readedBooks.firstIndex(of: book)!
selectBookID = book.id
showCover = true
if !isRendererImage{
selectBookID = book.id
showCover = true
}
})


Expand Down Expand Up @@ -437,10 +438,12 @@ struct Statistics: View {
}
.sheet(isPresented: $showSharePic){
ScrollView{
VStack(spacing: 20){
VStack(){
exportBox(isRendererImage: true,isShow: true)

Color.accentColor.frame(height:1)
.padding(.top,0)
.padding(.bottom,30)

ShareLink(item: Image(uiImage: generateSnapshot()), preview: SharePreview("BookTime")){
Label( "Share",systemImage:"square.and.arrow.up.circle")
Expand All @@ -455,7 +458,7 @@ struct Statistics: View {

}

.fullScreenCover(isPresented: $showCover, content: {
.sheet(isPresented: $showCover, content: {
GeometryReader{reader in
let scale = reader.size.height / 400 * 0.618
TabView(selection: $selectBookID){
Expand All @@ -467,16 +470,6 @@ struct Statistics: View {
}
.tabViewStyle(PageTabViewStyle(indexDisplayMode: .never))
}
.onTapGesture(perform: {
showCover = false
})
.gesture(DragGesture().onEnded{value in

if value.translation.height > 20 {
showCover = false
}

})

})

Expand Down

0 comments on commit 873c197

Please sign in to comment.