ActionCellView SwiftUI - admiral-team/admiralui-ios GitHub Wiki

Class

A view object for present action bar.


Declaration

public struct ActionCellView<T>: View where T: ListViewCell

Overview

The container to display ActionBar and ListCell.

By default ActionBar is hidden. It is appears by swiping view to the left edge and disappear when swipe to the right edge.

There is two available styles for ActionCellView:

  • default
  • secondary

Live example

Configure a ActionCellView default

 ActionCellView(cellView: ListCell(centerView: {
     TitleMoreDetailTextMessageListView(
         title: "Title",
         more: "More",
         detaile: "Summ",
         detaileMore: "More",
         subtitle: "Subtitle",
         tagText: "Percent",
         messageText: "Text message")
 }, trailingView: {
     ArrowListView()
 }), actions: [
     ActionItemBarAction(
         image: Image("Your image"),
         handler: {}),
     ActionItemBarAction(
         image: Image("Your image"),
         handler: {}),
     ActionItemBarAction(
         image: Image("Your image"),
         handler: {})]
 )

Configure a ActionCellView secondary

 ActionCellView(cellView: ListCell(centerView: {
     TitleMoreDetailTextMessageListView(
         title: "Title",
         more: "More",
         detaile: "Summ",
         detaileMore: "More",
         subtitle: "Subtitle",
         tagText: "Percent",
         messageText: "Text message")
 }, trailingView: {
     ArrowListView()
 }), actions: [
     ActionItemBarAction(
         image: Image("Your image"),
         handler: {}),
     ActionItemBarAction(
         image: Image("Your image"),
         handler: {}),
     ActionItemBarAction(
         image: Image("Your image"),
         handler: {})],
  style: .secondary
 )

Contribution

You can help us to find bugs or ask us to add features.

  • To start issue please use ready-made templates.
  • To make changes to the repository, you need to create a fork of the project, make changes to the code and create a pull request in our project. You can read more about this in the Github documentation.