Created
May 7, 2012 18:26
-
-
Save joelmoss/2629474 to your computer and use it in GitHub Desktop.
UITableView dataSource must return a cell from tableView:cellForRowAtIndexPath:
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
| class AppDelegate | |
| def application(application, didFinishLaunchingWithOptions:launchOptions) | |
| @window = UIWindow.alloc.initWithFrame UIScreen.mainScreen.bounds | |
| @window.rootViewController = ContactsController.alloc.init | |
| @window.makeKeyAndVisible | |
| true | |
| end | |
| end | |
| class ContactsController < UITableViewController | |
| def tableView(tableView, numberOfRowsInSection:section) | |
| 3 | |
| end | |
| def tableView(tableView, celForRowAtIndexPath:indexPath) | |
| cell = UITableViewCell.alloc.initWithStyle UITableViewCellStyleDefault, reuseIdentifier:nil | |
| cell.textLabel.text = 'stuff!' | |
| cell | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
def tableView(tableView, celForRowAtIndexPath:indexPath)-- missing the secondlin "cell"?