I am facing situation to use external parameter name to a function parameter name .. How to achieve this
parameter name to a function parameter name
func join(string s1: String, toString s2: String, withJoiner joiner: String) -> String { return s1 + joiner + s2 }
To call function above
join(string: "hello", toString: "world", withJoiner: ", ")
How to declare single parameter which accept multiple values.
How to use default values for parameter in function. What will happens when value is not passed for a default parameters.
Is it possible to set multiple return type for function in SWIFT. If yes please provide me syntax .
How to set return type for function in SWIFT.
How to say to my view controller to use UITableViewDataSource and UITableViewDelegate
class listItems: UIViewController { var aTableView:UITableView = UITableView() override func viewDidLoad() { super.viewDidLoad() aTableView.delegate = self aTableView.dataSource = self self.view.addSubview(aTableView) } }