라이브 방 - 배너 광고 추가

This commit is contained in:
Yu Sung
2023-09-15 18:27:53 +09:00
parent f44ef505cf
commit 8c20ce9c62
3 changed files with 11 additions and 2 deletions

View File

@@ -8,6 +8,7 @@
import SwiftUI
import Kingfisher
import PopupView
import GoogleMobileAds
struct LiveRoomView: View {
@State private var isShowingNewChat = false
@@ -288,7 +289,13 @@ struct LiveRoomView: View {
InputChatView {
isShowingNewChat = false
proxy.scrollTo(viewModel.messages.count - 1, anchor: .center)
}.padding(.bottom, keyboardHandler.keyboardHeight > 0 ? 0 : 15)
}
BannerAdView(adUnitId: LIVE_ROOM_BANNER_AD_UNIT_ID)
.frame(
width: screenSize().width,
height: keyboardHandler.keyboardHeight <= 10 ? GADCurrentOrientationAnchoredAdaptiveBannerAdSizeWithWidth(screenSize().width).size.height : 0.2
)
}
VStack(spacing: 13.3) {
@@ -339,7 +346,7 @@ struct LiveRoomView: View {
}
}
.padding(.trailing, 16.7)
.padding(.bottom, 85)
.padding(.bottom, keyboardHandler.keyboardHeight > 0 ? 85 : 143)
if isShowingNewChat {
NewChatView{