UserHistoryView

class UserHistoryView : UIView, UITableViewDelegate, UITableViewDataSource, UINavigationBarDelegate

User History View set up

Properties

  • This is a list of Contents which is used to store history contents

    Declaration

    Swift

    var historyContent: [Content]
  • The Back button

    Declaration

    Swift

    @IBOutlet
    var backButton: UIButton!
  • Connenct to UInavigationBar

    Declaration

    Swift

    @IBOutlet
    var navBar: UINavigationBar!
  • Undocumented

    Declaration

    Swift

    @IBOutlet
    var tableView: UITableView!

Methods

  • Customise View

    • Setup TableView

    Declaration

    Swift

    func customisation()
  • This will hide the historyview when a notification value true is being sent

    Declaration

    Swift

    @IBAction
    func hideHistoryView(_: Any)

Delegate

  • Tells the list of history Contents to return the number of rows in a given section of a table view.

    Declaration

    Swift

    func tableView(_: UITableView, numberOfRowsInSection _: Int) -> Int

    Parameters

    tableView

    The table-view object requesting this information.

    indexPath

    An index number identifying a section in tableView.

    Return Value

    The number of rows in section.

  • Asks the list of Centents for a cell to insert in a particular location of the table view.

    Declaration

    Swift

    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell

    Parameters

    tableView

    A table-view object requesting the cell.

    indexPath

    An index path locating a row in tableView.

    Return Value

    An object inheriting from UITableViewCell that the table view can use for the specified row. UIKit raises an assertion if you return nil.

  • Tells the delegate that the specified row is now selected. And send open notification

    Declaration

    Swift

    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath)

    Parameters

    tableView

    A table-view object informing the delegate about the new row selection.

    indexPath

    An index path locating the new selected row in tableView.

View LifeCycle

  • Called after the controller'€™s view is loaded into memory. Load customisation

    Declaration

    Swift

    override func awakeFromNib()