
### ContentWidget
Content Widget is a feature in our Software Development Kit that allows you to embed an easily customizable view with various types of content in your application.
  
**Declared In:**  
Headers/SNRContentWidget.h
  
**Related To:**  
[ContentWidgetOptions](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidgetoptions)  
[ContentWidgetAppearance](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidgetappearance)    
[ContentWidgetDelegate](/developers/mobile-sdk/listeners-and-delegates/ios-delegates#content-widget-delegate)
  
**Inherits From:**  
[NSObject](https://developer.apple.com/documentation/objectivec/nsobject)
  
**Declaration:**

<div class="content-tabs code-tabs" data-tab-group="tabgrp-222">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-222-0" data-tab-group="tabgrp-222" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-222-1" data-tab-group="tabgrp-222">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-222-0" data-tab-group="tabgrp-222" data-tab-active="true">

```Swift
class ContentWidget: NSObject
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-222-1" data-tab-group="tabgrp-222">

```Objective-C
@interface SNRContentWidget : NSObject
```

</div>
</div>

  
**Properties:**
| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| **options** | [ContentWidgetOptions](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidgetoptions) | no | Business configuration of the widget |
| **appearance** | [ContentWidgetAppearance](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidgetappearance) | no | UI configuration of the widget |
| **delegate** | [ContentWidgetDelegate](/developers/mobile-sdk/listeners-and-delegates/ios-delegates#content-widget-delegate) | no | Delegate of the widget |
  
**Initializers:**

<div class="content-tabs code-tabs" data-tab-group="tabgrp-223">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-223-0" data-tab-group="tabgrp-223" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-223-1" data-tab-group="tabgrp-223">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-223-0" data-tab-group="tabgrp-223" data-tab-active="true">

```Swift
init(options: ContentWidgetOptions, appearance: ContentWidgetAppearance)
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-223-1" data-tab-group="tabgrp-223">

```Objective-C
- (instancetype)initWithOptions:(nonnull SNRContentWidgetOptions *)options andAppearance:(nonnull SNRContentWidgetAppearance *)appearance
```

</div>
</div>



**Methods:**

Starts operation of fetching data and creates view structure of widget.

<div class="content-tabs code-tabs" data-tab-group="tabgrp-224">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-224-0" data-tab-group="tabgrp-224" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-224-1" data-tab-group="tabgrp-224">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-224-0" data-tab-group="tabgrp-224" data-tab-active="true">

```Swift
func load()
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-224-1" data-tab-group="tabgrp-224">

```Objective-C
- (void)load
```

</div>
</div>


---

Checks whether widget is loaded with success.

<div class="content-tabs code-tabs" data-tab-group="tabgrp-225">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-225-0" data-tab-group="tabgrp-225" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-225-1" data-tab-group="tabgrp-225">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-225-0" data-tab-group="tabgrp-225" data-tab-active="true">

```Swift
func isLoaded() -> Bool
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-225-1" data-tab-group="tabgrp-225">

```Objective-C
- (BOOL)isLoaded
```

</div>
</div>


---

Gets root view of whole widget view structure.

<div class="content-tabs code-tabs" data-tab-group="tabgrp-226">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-226-0" data-tab-group="tabgrp-226" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-226-1" data-tab-group="tabgrp-226">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-226-0" data-tab-group="tabgrp-226" data-tab-active="true">

```Swift
func getView() -> UIView
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-226-1" data-tab-group="tabgrp-226">

```Objective-C
- (UIView *)getView
```

</div>
</div>


---
---

### ContentWidgetAppearance
The **ContentWidgetAppearance** class is responsible for defining the appearance of the widget.
  
**Declared In:**  
Headers/SNRContentWidgetAppearance.h  
  
**Related To:**  
[SNRContentWidget](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidget)   
[SNRContentWidgetLayout](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidgetlayout)   
[SNRContentWidgetHorizontalSliderLayout](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidgethorizontalsliderlayout)   
[SNRContentWidgetGridLayout](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidgetgridlayout)   
[SNRContentWidgetItemLayout](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidgetitemlayout)  
[SNRContentWidgetBasicProductItemLayout](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidgetbasicproductitemlayout)   
  
**Inherits From:**  
[NSObject](https://developer.apple.com/documentation/objectivec/nsobject)  
  
**Declaration:**

<div class="content-tabs code-tabs" data-tab-group="tabgrp-227">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-227-0" data-tab-group="tabgrp-227" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-227-1" data-tab-group="tabgrp-227">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-227-0" data-tab-group="tabgrp-227" data-tab-active="true">

```Swift
class ContentWidgetAppearance: NSObject
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-227-1" data-tab-group="tabgrp-227">

```Objective-C
@interface SNRContentWidgetAppearance : NSObject
```

</div>
</div>

  
**Properties:**
| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| **layout** | [ContentWidgetLayout](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidgetlayout) | no | UI configuration of the widget's layout |
| **itemLayout** | [ContentWidgetItemLayout](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidgetitemlayout) | no | UI configuration a single widget item |
  
**Initializers:**

<div class="content-tabs code-tabs" data-tab-group="tabgrp-228">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-228-0" data-tab-group="tabgrp-228" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-228-1" data-tab-group="tabgrp-228">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-228-0" data-tab-group="tabgrp-228" data-tab-active="true">

```Swift
init(widgetLayout: ContentWidgetLayout, itemLayout: ContentWidgetItemLayout)
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-228-1" data-tab-group="tabgrp-228">

```Objective-C
- (instancetype)initWithLayout:(nonnull SNRContentWidgetLayout *)layout andItemLayout:(nonnull SNRContentWidgetItemLayout *)itemLayout
```

</div>
</div>


---
---

### ContentWidgetOptions
**Declared In:**  
Headers/SNRContentWidgetOptions.h  
  
**Related To:**  
[SNRContentWidget](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidget)   
  
**Inherits From:**  
[NSObject](https://developer.apple.com/documentation/objectivec/nsobject)
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-229">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-229-0" data-tab-group="tabgrp-229" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-229-1" data-tab-group="tabgrp-229">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-229-0" data-tab-group="tabgrp-229" data-tab-active="true">

```Swift
class ContentWidgetOptions: NSObject
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-229-1" data-tab-group="tabgrp-229">

```Objective-C
@interface SNRContentWidgetOptions : NSObject
```

</div>
</div>


---
---

### ContentWidgetRecommendationsOptions
The **ContentWidgetRecommendationsOptions** class is responsible for defining the business logic options of the widget.
  
**Declared In:**  
Headers/SNRContentWidgetOptions.h
  
**Related To:**  
[SNRContentWidget](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidget)   
  
**Inherits From:**  
[NSObject](https://developer.apple.com/documentation/objectivec/nsobject)
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-230">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-230-0" data-tab-group="tabgrp-230" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-230-1" data-tab-group="tabgrp-230">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-230-0" data-tab-group="tabgrp-230" data-tab-active="true">

```Swift
class ContentWidgetRecommendationsOptions: NSObject
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-230-1" data-tab-group="tabgrp-230">

```Objective-C
@interface SNRContentWidgetRecommendationsOptions : NSObject
```

</div>
</div>

  
**Properties:**
| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| **slug** | String | no | Slug of a document |
| **productID** | String | yes | Product identifier for generating data |
| **mapping** | ((ContentWidgetRecommendationModel) -> (ContentWidgetRecommendationDataModel)) | no | Mapping block responsible for mapping data from the feed to a ContentWidgetRecommendationDataModel |
| **recommendationEventType** | ContentWidgetRecommendationEventType | - | Recommendation event type. <ul><li>**.view** sends all products in one event. We highly recommend using this type of event in content widget.</li><li>**.seen** sends each event as a separate event.</li></ul> |

**Initializers:**

<div class="content-tabs code-tabs" data-tab-group="tabgrp-231">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-231-0" data-tab-group="tabgrp-231" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-231-1" data-tab-group="tabgrp-231">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-231-0" data-tab-group="tabgrp-231" data-tab-active="true">

```Swift
init()
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-231-1" data-tab-group="tabgrp-231">

```Objective-C
- (instancetype)init
```

</div>
</div>


---
---

### ContentWidgetLayout
Main widget layout abstract class for inheriting classes.
  
**Declared In:**  
Headers/SNRContentWidgetLayout.h
  
**Related To:**  
[SNRContentWidget](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidget)   
  
**Inherits From:**  
[NSObject](https://developer.apple.com/documentation/objectivec/nsobject)
  
**Declaration:**

<div class="content-tabs code-tabs" data-tab-group="tabgrp-232">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-232-0" data-tab-group="tabgrp-232" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-232-1" data-tab-group="tabgrp-232">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-232-0" data-tab-group="tabgrp-232" data-tab-active="true">

```Swift
class ContentWidgetLayout: NSObject
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-232-1" data-tab-group="tabgrp-232">

```Objective-C
@interface SNRContentWidgetLayout : NSObject
```

</div>
</div>

  
**Properties:**
| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| **backgroundColor** | UIColor | yes | Background color of a widget |
| **insets** | UIEdgeInsets | yes | Inner widget margins in pt |
| **itemSize** | Size | yes | Size of a single item in pt |
| **numberOfItems** | Int | yes | It returns the number of items after the widget is loaded |


<div class="admonition admonition-important"><div class="admonition-icon"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2.5"><path stroke-linecap="round" stroke-linejoin="round" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" /></svg></div><div class="admonition-body"><div class="admonition-content">

**numberOfItems** property is read-only.

</div></div></div>


---
---

### ContentWidgetHorizontalSliderLayout
This layout is intended to present recommendations in a fixed-hight horizontal scrollable slider.
  
**Declared In:**
Headers/SNRContentWidgetHorizontalSliderLayout.h
  
**Related To:**  
[SNRContentWidget](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidget)   
  
**Inherits From:**  
[ContentWidgetLayout](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidgetlayout)
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-233">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-233-0" data-tab-group="tabgrp-233" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-233-1" data-tab-group="tabgrp-233">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-233-0" data-tab-group="tabgrp-233" data-tab-active="true">

```Swift
class ContentWidgetHorizontalSliderLayout: ContentWidgetLayout
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-233-1" data-tab-group="tabgrp-233">

```Objective-C
@interface SNRContentWidgetHorizontalSliderLayout : SNRContentWidgetLayout
```

</div>
</div>

  
**Properties:**
| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| **itemSpacing** | Float | yes | Horizontal spacing between items in pt |

---
---

### ContentWidgetGridLayout
This layout presents recommendations in a vertical scrollable grid, with elements organized into columns and rows. You can create a full- or half-screen widget.
  
**Declared In:**  
Headers/SNRContentWidgetGridLayout.h  
  
**Related To:**  
[SNRContentWidget](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidget)   
  
**Inherits From:**  
[ContentWidgetLayout](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidgetlayout)
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-234">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-234-0" data-tab-group="tabgrp-234" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-234-1" data-tab-group="tabgrp-234">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-234-0" data-tab-group="tabgrp-234" data-tab-active="true">

```Swift
class ContentWidgetGridLayout: ContentWidgetLayout
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-234-1" data-tab-group="tabgrp-234">

```Objective-C
@interface SNRContentWidgetGridLayout : SNRContentWidgetLayout
```

</div>
</div>

  
**Properties:**
| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| **itemHorizontalSpacing** | Float | yes | Horizontal spacing between items in pt |
| **itemVerticalSpacing** | Float | yes | Vertical spacing between items in pt |

---
---

### ContentWidgetItemLayout
Main widget layout item abstract class for inheriting classes.
  
**Declared In:**  
Headers/SNRContentWidgetItemLayout.h  
  
**Related To:**  
[ContentWidget](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidget)  
[ContentWidgetAppearance](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidgetappearance)  
  
**Inherits From:**  
[NSObject](https://developer.apple.com/documentation/objectivec/nsobject)
  
**Declaration:**

<div class="content-tabs code-tabs" data-tab-group="tabgrp-235">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-235-0" data-tab-group="tabgrp-235" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-235-1" data-tab-group="tabgrp-235">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-235-0" data-tab-group="tabgrp-235" data-tab-active="true">

```Swift
class ContentWidgetItemLayout: NSObject
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-235-1" data-tab-group="tabgrp-235">

```Objective-C
@interface SNRContentWidgetItemLayout : NSObject
```

</div>
</div>

  
**Properties:**
| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| **backgroundColor** | UIColor | no | Background color of an item |
| **cornerRadius** | Float | no | Radius of the item corners |
| **borderWidth** | Float | no | Width of the item’s border |
| **borderColor** | UIColor | no | Color of the item’s border |
| **shadowColor** | UIColor | no | Color of the item’s shadow |

---
---

### ContentWidgetBasicProductItemLayout
This is the basic layout for items. It contains: the image, the title, and the price from the uploaded data.
  
**Declared In:**  
Headers/SNRContentWidgetBasicProductItemLayout.h
  
**Related To:**  
[ContentWidget](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidget)  
[ContentWidgetAppearance](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidgetappearance)  
  
**Inherits From:**  
[ContentWidgetItemLayout](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidgetitemlayout)
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-236">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-236-0" data-tab-group="tabgrp-236" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-236-1" data-tab-group="tabgrp-236">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-236-0" data-tab-group="tabgrp-236" data-tab-active="true">

```Swift
class ContentWidgetBasicProductItemLayout: ContentWidgetItemLayout
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-236-1" data-tab-group="tabgrp-236">

```Objective-C
@interface SNRContentWidgetBasicProductItemLayout : SNRContentWidgetItemLayout
```

</div>
</div>

  
**Properties:**
| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| **imageWidthRatio** | Float | no | Image width. A ratio of 1.0 means that the image width equals to 100% of the entire height of the item |
| **imageHeightRatio** | Float | no | Image height. A ratio of 0.3 means that image height equals to 30% of the entire height of the item |
| **imageBackground** | UIColor | no | Background color of the image |
| **titleInsets** | UIEdgeInsets | no | Inner margins of the title label |
| **titleFont** | UIFont | no | Font of the item title label |
| **titleFontColor** | UIColor | no | Color of the title label |
| **titleAlignment** | NSTextAlignment | no | Alignment of the title label |
| **priceInsets** | UIEdgeInsets | no | Inner margins of the price label |
| **priceFont** | UIFont | no | Font of the price label |
| **priceFontColor** | UIColor | no | Color of the price label |
| **priceAlignment** | NSTextAlignment | no | Alignment of the price label |
| **priceGroupSeparator** | String | no | Separator of price group |
| **priceDecimalSeparator** | String | no | Separator of price decimal |
| **isSalePriceVisible** | Bool | no | Flag determining whether to show the sale price label or not |
| **salePriceOrientation** | UILayoutConstraintAxis | no | Orientation of the sale price label |
| **salePriceMargin** | Float | no | Margin between the price label and the sale price label |
| **regularPriceFont** | UIFont | no | Font of the regular price label |
| **regularPriceFontColor** | UIColor | no | Color of the regular price label |
| **salePriceFont** | UIFont | no | Font of the sale price label  |
| **salePriceFontColor** | UIColor | no | Color of the sale price label |
| **actionButton** | ContentWidgetImageButtonCustomAction | no | Optional button for your own custom action |
| **actionButtonPosition** | CGPoint | no | Position of the action button |

---
---

### ContentWidgetBaseCustomAction
Main widget custom action abstract class for inheriting classes.
  
**Declared In:**  
Headers/SNRContentWidgetItemLayout.h  
  
**Related To:**  
[ContentWidget](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidget)  
[ContentWidgetAppearance](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidgetappearance)  
  
**Inherits From:**  
[NSObject](https://developer.apple.com/documentation/objectivec/nsobject)  
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-237">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-237-0" data-tab-group="tabgrp-237" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-237-1" data-tab-group="tabgrp-237">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-237-0" data-tab-group="tabgrp-237" data-tab-active="true">

```Swift
class ContentWidgetBaseCustomAction: NSObject
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-237-1" data-tab-group="tabgrp-237">

```Objective-C
@interface SNRContentWidgetBaseCustomAction : NSObject
```

</div>
</div>


**Properties:**
| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| **predefinedActionType** | ContentWidgetBaseCustomActionPredefiniedActionType | no | It determines which event is on click |

---
---

### ContentWidgetImageButtonCustomAction
**ContentWidgetImageButtonCustomAction** is used to add an image button to your widget (only if the item layout allows). You can add a button with a single state or make it selectable.
  
**Declared In:**  
Headers/SNRContentWidgetImageButtonCustomAction.h
  
**Related To:**  
[ContentWidget](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidget)  
[ContentWidgetAppearance](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidgetappearance)  
  
**Inherits From:**  
[ContentWidgetBaseCustomAction](/developers/mobile-sdk/class-reference/ios/content-widget#contentwidgetbasecustomaction)
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-238">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-238-0" data-tab-group="tabgrp-238" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-238-1" data-tab-group="tabgrp-238">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-238-0" data-tab-group="tabgrp-238" data-tab-active="true">

```Swift
class ContentWidgetImageButtonCustomAction: NSObject
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-238-1" data-tab-group="tabgrp-238">

```Objective-C
@interface SNRContentWidgetImageButtonCustomAction : NSObject
```

</div>
</div>

  
**Properties:**
| Property | Type | Optional | Description |
| --- | --- | --- | --- |
| **size** | Size | yes | Button size |
| **backgroundColor** | UIColor | yes | Background color of the button |
| **tintColor** | UIColor | yes | Fill color of the button’s image, if an asset supports it |
| **image** | UIImage | yes | Button image |
| **isSelectable** | Bool | yes | Flag determining whether the button is selectable |
| **selectedImage** | UIImage | yes | Image of the button when the button is selected |
| **isSelected** | ContentWidgetImageButtonCustomActionIsSelectedBlock | yes | Block/closure to be executed when the widget needs to determine the state of a button in the cell |
| **onReceiveClick** | ContentWidgetImageButtonCustomActionReceiveClickBlock | yes | Block/closure to be executed when the button is clicked |

---
---

### ContentWidgetBaseCustomActionPredefiniedActionType
**Declared In:**  
Headers/SNRContentWidgetBaseCustomAction.h  
  
**Declaration:**  

<div class="content-tabs code-tabs" data-tab-group="tabgrp-239">
<div class="tab-buttons"><button class="tab-button" data-tab-id="tabgrp-239-0" data-tab-group="tabgrp-239" data-tab-active="true">Swift</button><button class="tab-button" data-tab-id="tabgrp-239-1" data-tab-group="tabgrp-239">Objective-C</button></div>

<div class="tab-panel" data-tab-id="tabgrp-239-0" data-tab-group="tabgrp-239" data-tab-active="true">

```Swift
enum ContentWidgetBaseCustomActionPredefiniedActionType: Int {
    none,
    sendLikeEvent
}
```

</div>

<div class="tab-panel" data-tab-id="tabgrp-239-1" data-tab-group="tabgrp-239">

```Objective-C
typedef NS_ENUM(NSUInteger, SNRContentWidgetBaseCustomActionPredefiniedActionType) {
    SNRContentWidgetBaseCustomActionPredefiniedActionTypeNone = 0,
    SNRContentWidgetBaseCustomActionPredefiniedActionTypeSendLikeEvent
}
```

</div>
</div>

