Last active
August 29, 2015 14:03
-
-
Save thinkclay/170911fae42e0c0b296a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import UIKit | |
| import SwifteriOS | |
| class TweetsViewController: UITableViewController { | |
| var tweets : [JSONValue] = [] | |
| override func viewWillLayoutSubviews() | |
| { | |
| super.viewWillLayoutSubviews() | |
| self.tableView.contentInset = UIEdgeInsetsMake(self.topLayoutGuide.length, 0, 0, 0) | |
| self.tableView.scrollIndicatorInsets = UIEdgeInsetsMake(self.topLayoutGuide.length, 0, 0, 0) | |
| } | |
| override func didReceiveMemoryWarning() | |
| { | |
| super.didReceiveMemoryWarning() | |
| } | |
| override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { | |
| return tweets.count | |
| } | |
| override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { | |
| let cell = UITableViewCell(style: .Subtitle, reuseIdentifier: nil) | |
| cell.textLabel.text = tweets[indexPath.row]["text"].string | |
| return cell | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment