@IBOutlet private weak var tableView: UITableView!
@IBAction private func backButton(_ sender: UIBarButtonItem){
navigationController?.popViewController(animated: true)
}
Do you think it's right to put private on outlets and actions as above? I've never seen a coding style like this before. However, in the access controller, if you use it only in inner classes, you should use Private. I'm trying to reduce memory by using private, is this the right way to do it?
Making a variable private does not reduce your memory footprint, just who has access to the variable.
I make my IBOutlets private because they are instantiated by the Storyboard or the nib and I'd rather not have any other parts of the app interact with them.