Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Wallet #341

@slowed404

Description

@slowed404

import UIKit

class SecurityTipsViewController: UITableViewController {

let tips = [
    "Use strong and unique passwords.",
    "Enable two-factor authentication.",
    "Avoid connecting to open WiFi networks without a password.",
    "Keep your software up to date.",
    "Be cautious with links in emails.",
    "Use antivirus software.",
    "Back up your data regularly.",
    "Avoid sharing personal information online."
]

override func viewDidLoad() {
    super.viewDidLoad()
    title = "Security Tips"
    tableView.register(UITableViewCell.self, forCellReuseIdentifier: "cell")
}

// MARK: - Table view data source

override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
    return tips.count
}

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

    let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
    cell.textLabel?.text = tips[indexPath.row]
    cell.textLabel?.numberOfLines = 0 // allow multi-line text
    return cell
}

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions