As shown in image, initially I need to hide last 2 rows (my profile and update profile) in my table view when the user fills the form accessed via the "Become a merchant" row. I need to hide the "Become a Merchant" row and show the last two rows. This is done by Bool function(true/false).
How could I do this?
var arrdata = ["Home", "Orders", "Change Password", "Log Out", "Become A Merchant", "My Profile", "Update Profile"]
override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
var isMerchantProfile: Bool = UserDefaults.standard.bool(forKey: "isFillMerchant")
if isMerchantProfile == true {
return 4
}
return arrdata.count
}