Skip to content
This repository has been archived by the owner on Apr 5, 2020. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/nmdias/Iris
Browse files Browse the repository at this point in the history
  • Loading branch information
nmdias committed May 15, 2016
2 parents 1b01899 + 7b7adeb commit b551008
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// FeedTableViewController + ReusableCell.swift
// Iris
//
// Created by Nuno Dias on 14/05/16.
//
//

import UIKit

extension FeedTableViewController {
func reusableCell() -> UITableViewCell {
let reuseIdentifier = "Cell"
if let cell = self.tableView.dequeueReusableCellWithIdentifier(reuseIdentifier) { return cell }
let cell = UITableViewCell(style: .Value1, reuseIdentifier: reuseIdentifier)
cell.accessoryType = .DisclosureIndicator
return cell
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
//
// FeedTableViewController + TableViewLayout.swift
// Iris
//
// Created by Nuno Dias on 14/05/16.
//
//

import Foundation

extension FeedTableViewController {
enum TableViewLayout {
case Title, Link, Description, Items
init?(indexPath: NSIndexPath) {
switch indexPath.section {
case 0:
switch indexPath.row {
case 0: self = .Title
case 1: self = .Link
case 2: self = .Description
default: return nil
}
case 1: self = .Items
default: return nil
}
}
}
}

0 comments on commit b551008

Please sign in to comment.