Commit 751628f7 by Dima Bart

Update customer sample app to adapt to NSOrderedSet.

parent d912be88
......@@ -88,12 +88,12 @@ extension OrdersViewController: UITableViewDataSource {
func tableView(tableView: UITableView, titleForFooterInSection section: Int) -> String? {
let order = self.orders[section]
return "Order total: $\(order.totalPrice) \(order.currency)"
return "Order total: $\(order.totalPrice)"
}
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("cell", forIndexPath: indexPath) as! LineItemCell
let lineItem = self.orders[indexPath.section].lineItems[indexPath.row]
let lineItem = self.orders[indexPath.section].lineItemsArray[indexPath.row]
cell.setLineItem(lineItem)
......@@ -106,9 +106,7 @@ extension OrdersViewController: UITableViewDataSource {
//
extension BUYOrder {
var lineItems: [BUYLineItem] {
var items = self.fulfilledLineItems
items.appendContentsOf(self.unfulfilledLineItems)
return items
var lineItemsArray: [BUYLineItem] {
return self.lineItems.array as! [BUYLineItem]
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment