# MainPlaceAction

    struct MainPlaceAction

Represents a custom place view action that can be displayed in the main body area of a place
view.
- `


  ### [accessibilityLabel](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/MainPlaceAction#/s:17GooglePlacesSwift15MainPlaceActionV18accessibilityLabelSSSgvp)


  `

  #### Declaration

  Swift

      let accessibilityLabel: String?

- `


  ### [image](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/MainPlaceAction#/s:17GooglePlacesSwift15MainPlaceActionV5image0C2UI5ImageVSgvp)


  `

  #### Declaration

  Swift

      let image: Image?

- `


  ### [init(image:label:accessibilityLabel:style:onTap:)](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/MainPlaceAction#/s:17GooglePlacesSwift15MainPlaceActionV5image5label18accessibilityLabel5style5onTapAC0C2UI5ImageVSg_S2SSgAA0eF5StyleOyAA0E0Vctcfc)


  ` Initializes a main place action with the given parameters.

  #### Declaration

  Swift

      init(image: Image? = nil, label: String, accessibilityLabel: String? = nil, style: https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Enums/PlaceActionStyle.html = .secondary, onTap: @escaping (https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/Place.html) -> Void)

  #### Parameters

  |---|---|
  | ` image ` | The image to display for the action. If nil, no image will be displayed. |
  | ` label ` | The text label to display for the action. |
  | ` accessibilityLabel ` | The accessibility label for the action. If nil, the label will be used. |
  | ` style ` | The style of the action. |
  | ` onTap ` | The closure to perform when the action is tapped. |

- `


  ### [label](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/MainPlaceAction#/s:17GooglePlacesSwift15MainPlaceActionV5labelSSvp)


  `

  #### Declaration

  Swift

      let label: String

- `


  ### [onTap](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/MainPlaceAction#/s:17GooglePlacesSwift15MainPlaceActionV5onTapyyAA0E0Vcvp)


  `

  #### Declaration

  Swift

      let onTap: (https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/Place.html) -> Void

- `


  ### [style](https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Structs/MainPlaceAction#/s:17GooglePlacesSwift15MainPlaceActionV5styleAA0eF5StyleOvp)


  `

  #### Declaration

  Swift

      let style: https://developers.google.com/maps/documentation/places/ios-sdk/reference/swift/Enums/PlaceActionStyle.html