라이브 방 - 배너 광고 추가

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

@ -22,3 +22,4 @@ let FOLLOWING_CHANNEL_LIST_BANNER_AD_UNIT_ID = "ca-app-pub-3940256099942544/2934
let LIVE_NOW_ALL_LIST_BANNER_AD_UNIT_ID = "ca-app-pub-3940256099942544/2934735716"
let CREATOR_CHANNEL_BANNER_AD_UNIT_ID = "ca-app-pub-3940256099942544/2934735716"
let MESSAGE_BANNER_AD_UNIT_ID = "ca-app-pub-3940256099942544/2934735716"
let LIVE_ROOM_BANNER_AD_UNIT_ID = "ca-app-pub-3940256099942544/2934735716"

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{

View File

@ -22,3 +22,4 @@ let FOLLOWING_CHANNEL_LIST_BANNER_AD_UNIT_ID = "ca-app-pub-1299501215847962/2254
let LIVE_NOW_ALL_LIST_BANNER_AD_UNIT_ID = "ca-app-pub-1299501215847962/2446123029"
let CREATOR_CHANNEL_BANNER_AD_UNIT_ID = "ca-app-pub-1299501215847962/3614614905"
let MESSAGE_BANNER_AD_UNIT_ID = "ca-app-pub-1299501215847962/6432349937"
let LIVE_ROOM_BANNER_AD_UNIT_ID = "ca-app-pub-1299501215847962/1111778485"