SettingsView
class SettingsView : UIView, UITableViewDelegate, UITableViewDataSource, MFMailComposeViewControllerDelegate
This a Setting View
-
This is a
tableViewto display the setting contents as cellDeclaration
Swift
@IBOutlet var tableView: UITableView! -
This is background View
Declaration
Swift
@IBOutlet var backgroundView: UIButton! -
This is a
NSLayoutConstraintfor the bottom constraintDeclaration
Swift
@IBOutlet var tableViewBottomConstraint: NSLayoutConstraint! -
This is a variable for delegates
Declaration
Swift
var delegate: SettingsViewControllerDelegate? -
The items on setting view
Declaration
Swift
let items: [String] -
Show Login
Declaration
Swift
var showLogin: (() -> Void)
-
Customise the view
Declaration
Swift
func customisation() -
Hide setting View
Declaration
Swift
@IBAction func hideSettingsView(_: Any)
-
Tells the items to return the number of rows in a given section of a table view.
Declaration
Swift
func tableView(_: UITableView, numberOfRowsInSection _: Int) -> IntParameters
tableViewThe table-view object requesting this information.
indexPathAn index number identifying a section in tableView.
Return Value
The number of rows in section.
-
Asks the list of
Cententfor a cell to insert in a particular location of the table view.Declaration
Swift
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCellParameters
tableViewA table-view object requesting the cell.
indexPathAn index path locating a row in tableView.
Return Value
An object inheriting from
UITableViewCell that the table view can use for the specified row.UIKitraises an assertion if you return nil. -
Tells the delegate that the specified row is now selected.
Declaration
Swift
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath)Parameters
tableViewA table-view object informing the delegate about the new row selection.
indexPathAn index path locating the new selected row in tableView.
-
Tells the delegate that the user wants to dismiss the mail composition view.
Declaration
Swift
func mailComposeController(_ controller: MFMailComposeViewController, didFinishWith _: MFMailComposeResult, error _: Error?)Parameters
controllerThe view controller object that manages the mail composition view.
didFinishWithThe result of the user’s action.
errorIf an error occurred, this parameter contains an error object with information about the type of failure.
-
Called after the controller's view is loaded into memory. Load
customisationDeclaration
Swift
override func awakeFromNib()
SettingsView Class Reference