DetailViewController

open class DetailViewController : StatefulViewController

A StatefulViewController subclass that manages a generic detail view.

This view controller serves as the base design of a detail view. An object conforming to the DetailController protocol is the data provider and action handler of this view controller.

Note

Being a subclass of a NibViewController, an associated nib file is required with outlets connected.

IBOutlets

  • Scroll view of the detail view.

    Declaration

    Swift

    @IBOutlet
    public var scrollView: UIScrollView!
  • The parent view of all other views.

    Declaration

    Swift

    @IBOutlet
    public var contentView: UIView!
  • Container for the image of the detail.

    Declaration

    Swift

    @IBOutlet
    public var imageView: UIImageView!
  • A stack view that holds the labels for the detail,

    Declaration

    Swift

    @IBOutlet
    public var labelStackView: UIStackView!
  • Heading of the detail.

    Declaration

    Swift

    @IBOutlet
    public var headingLabel: UILabel!
  • Subheading of the detail.

    Declaration

    Swift

    @IBOutlet
    public var subheadingLabel: UILabel!
  • Body of the detail.

    Declaration

    Swift

    @IBOutlet
    public var bodyLabel: UILabel!
  • Points of the detail.

    Declaration

    Swift

    @IBOutlet
    public var pointsLabel: UILabel!
  • Perdiod of the detail.

    Declaration

    Swift

    @IBOutlet
    public var periodLabel: UILabel!
  • The button use for providing action for the detail.

    Declaration

    Swift

    @IBOutlet
    public var actionButton: UIButton!

Properties

  • The refresh control attached to the collection view for pull to refresh events.

    Declaration

    Swift

    open lazy var refreshControl: UIRefreshControl { get set }
  • The detail controller.

    This casts the contentController property to a detailController and returns it.

    Declaration

    Swift

    open var detailController: DetailController? { get set }
  • Determines whether the detail view can be refresh or not.

    Declaration

    Swift

    open var isRefreshable: Bool { get set }

Initializers

  • Returns a newly initialized detail view controller with the specified collection controller.

    Declaration

    Swift

    public convenience init(detailController: DetailController,
                            isRefreshable: Bool = true)

    Parameters

    detailController

    The detail controller to associate with.

    isRefreshable

    Boolean that tells if the detail view controller is refreshable or not.

    Return Value

    The initialized detail view controller.

Lifecycle

  • Declaration

    Swift

    override open func setup()
  • This method set values of the details image, labels and button title.

    Declaration

    Swift

    open func setupDetails()

Actions