Skip to content

Commit

Permalink
feat: 버튼과 탭바 사이 간격 넓히기
Browse files Browse the repository at this point in the history
  • Loading branch information
jongnan committed Aug 2, 2024
1 parent c5fbc9c commit 0eaac09
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ struct RecommendMemeButtonView : View {
}
}
}
.padding(.vertical, 30)
.padding(.horizontal, 32)
.frame(maxWidth: .infinity)
.frame(height: 110, alignment: .center)
.background(
LinearGradient(
colors: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,14 @@ public struct RecommendView: View {

@ObservedObject private var viewModel: RecommendViewModel

@State private var memeContentsHeight: CGFloat = 0
@State private var memeImageHeight: CGFloat = 0
@State private var zstackHeight: CGFloat = 0
@State private var buttonHeight: CGFloat = 0
@State private var currentMeme: MemeDetail?
@State private var buttonViewHeight: CGFloat = 0

@State private var currentMeme: MemeDetail?
@State var isActiveCopyPopup: Bool = false

@State var isFarmemed: Bool = false
@State var isActiveFarmemePopup: Bool = false

@State private var currentOffsetY: CGFloat = 0

public init(
Expand Down Expand Up @@ -59,7 +57,7 @@ public struct RecommendView: View {

ZStack {
VStack {
let isOverlapView = memeImageHeight + buttonHeight > zstackHeight + 30
let isOverlapView = memeImageHeight + buttonViewHeight > memeContentsHeight + 30

if viewModel.state.recommendMemes.count > 0 {
RecommendMemeImagesView(
Expand All @@ -86,14 +84,16 @@ public struct RecommendView: View {
shareButtonTapped : shareButtonTap,
saveButtonTapped : saveButtonTap
)
.padding(.bottom, 10)
.onReadSize { size in
buttonHeight = size.height
print(size.height)
buttonViewHeight = size.height
}
}
.zIndex(2)
}
.onReadSize { size in
zstackHeight = size.height
memeContentsHeight = size.height
}

Spacer(minLength: 98)
Expand Down

0 comments on commit 0eaac09

Please sign in to comment.