I have 2 functions (func A() and func B()). I want to know how to make function B wait for function A to execute before proceeding. I've done a lot of reading, and know we can somehow do it with asynchronous programming and semaphores, or with functions such as dispatch_barrier_sync. However, I'm really new to swift, and am not understanding how to code this. I would really appreciate it if someone could help.
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
A()
B()
}