@@ -80,7 +80,6 @@ class EmbeddedMessagesViewController: UIViewController {
80
80
}
81
81
82
82
func loadCardView( _ embeddedView: IterableEmbeddedView , _ embeddedMessage: IterableEmbeddedMessage ) {
83
- embeddedView. iterableEmbeddedViewDelegate = self
84
83
embeddedView. primaryBtn. isRoundedSides = true
85
84
embeddedView. secondaryBtn. isRoundedSides = true
86
85
// We are setting the width of buttons as 140 as per our embedded messages width. You can change as per your need
@@ -93,7 +92,6 @@ class EmbeddedMessagesViewController: UIViewController {
93
92
func loadBannerView( _ embeddedMessage: IterableEmbeddedMessage ) {
94
93
let config = IterableEmbeddedViewConfig ( borderCornerRadius: 10 )
95
94
let embeddedView = IterableEmbeddedView ( message: embeddedMessage, viewType: . banner, config: config)
96
- embeddedView. iterableEmbeddedViewDelegate = self
97
95
embeddedView. primaryBtn. isRoundedSides = true
98
96
embeddedView. secondaryBtn. isRoundedSides = true
99
97
// We are setting the width of buttons as 140 as per our embedded messages width. You can change as per your need
@@ -123,24 +121,6 @@ class EmbeddedMessagesViewController: UIViewController {
123
121
}
124
122
}
125
123
126
- extension EmbeddedMessagesViewController : IterableEmbeddedViewDelegate {
127
- func didPressPrimaryButton( button: UIButton , viewTag: Int , message: IterableSDK . IterableEmbeddedMessage ? ) {
128
- let buttonData = message? . elements? . buttons? . first
129
- let url = buttonData? . action? . data
130
- openUrl ( url)
131
- }
132
-
133
- func didPressSecondaryButton( button: UIButton , viewTag: Int , message: IterableSDK . IterableEmbeddedMessage ? ) {
134
- let buttonData = message? . elements? . buttons ? [ 1 ]
135
- let url = buttonData? . action? . data
136
- openUrl ( url)
137
- }
138
-
139
- func didPressBanner( banner: IterableSDK . IterableEmbeddedView , viewTag: Int , message: IterableSDK . IterableEmbeddedMessage ? ) {
140
- openUrl ( message? . elements? . defaultAction? . data)
141
- }
142
- }
143
-
144
124
extension EmbeddedMessagesViewController : UICollectionViewDelegate , UICollectionViewDataSource , UICollectionViewDelegateFlowLayout {
145
125
146
126
func collectionView( _ collectionView: UICollectionView ,
0 commit comments