@@ -71,8 +71,9 @@ public final class StaticInAppContentBlockView: UIView, WKNavigationDelegate {
71
71
)
72
72
return
73
73
}
74
- self . replacePlaceholder ( inputView: self , loadedInAppContentBlocksView: self . webview, height: height. height ) {
75
- self . heightCompletion ? ( Int ( height. height) )
74
+ let usableHeight = height. height - calculator. defaultPadding
75
+ self . replacePlaceholder ( inputView: self , loadedInAppContentBlocksView: self . webview, height: usableHeight) {
76
+ self . heightCompletion ? ( Int ( usableHeight) )
76
77
self . prepareContentReadyState ( true )
77
78
guard let message = self . assignedMessage else {
78
79
return
@@ -152,16 +153,16 @@ public final class StaticInAppContentBlockView: UIView, WKNavigationDelegate {
152
153
}
153
154
loadedInAppContentBlocksView. removeFromSuperview ( )
154
155
inputView. addSubview ( loadedInAppContentBlocksView)
155
- loadedInAppContentBlocksView. topAnchor. constraint ( equalTo: inputView. topAnchor, constant : 5 ) . isActive = true
156
- loadedInAppContentBlocksView. leadingAnchor. constraint ( equalTo: inputView. leadingAnchor, constant : 5 ) . isActive = true
157
- loadedInAppContentBlocksView. trailingAnchor. constraint ( equalTo: inputView. trailingAnchor, constant : - 5 ) . isActive = true
156
+ loadedInAppContentBlocksView. topAnchor. constraint ( equalTo: inputView. topAnchor) . isActive = true
157
+ loadedInAppContentBlocksView. leadingAnchor. constraint ( equalTo: inputView. leadingAnchor) . isActive = true
158
+ loadedInAppContentBlocksView. trailingAnchor. constraint ( equalTo: inputView. trailingAnchor) . isActive = true
158
159
if self . height != nil {
159
160
self . height? . constant = height
160
161
} else {
161
162
self . height = loadedInAppContentBlocksView. heightAnchor. constraint ( equalToConstant: height)
162
163
self . height? . isActive = true
163
164
}
164
- loadedInAppContentBlocksView. bottomAnchor. constraint ( equalTo: inputView. bottomAnchor, constant : - 5 ) . isActive = true
165
+ loadedInAppContentBlocksView. bottomAnchor. constraint ( equalTo: inputView. bottomAnchor) . isActive = true
165
166
loadedInAppContentBlocksView. sizeToFit ( )
166
167
loadedInAppContentBlocksView. layoutIfNeeded ( )
167
168
UIView . animate ( withDuration: duration) {
0 commit comments