sideround/IRImageTableView — pull request #2 by Dromaguirre (2014-08-21 23:07:32+00:00)
Title: Lots of changes

As you can see, I've changed lots of things in both the library and the example project. I'll explain every one of them:

- First of all, I changed the name of the library itself because it's really misleading. It's really important to follow naming conventions, since if you call it "IRImageTableView" most people will understand it as a subclass of a UITableView, but since it's actually a UIView__Controller__ subclass what you're building here you have to follow the inheritance naming convention and name it IRImageTableViewController.
- As I told you on Twitter, the delegate is not necessary. What really happened in the example project is that you subclassed `IRViewController` on `UIViewController`, not the `IRImageTableViewController` class itself. I changed it and your `IRViewController` got to inherit the `UITableViewDelegate` methods (including `tableView:didSelectRowAtIndexPath:`). That's how it should be done 99% of the time. That way you don't need to override delegate methods through new delegates.
- I changed the initialization method to `initWithData:` because I don't think providing a `UITableView` object is really necessary in most use cases of this library. Also, I think you should change the `data` property to another name, since it could also be misleading. At first sigh, it actually looks like a `NSData` object what it's asking for, when it's actually a `NSArray` of `NSDictionary`'s of `NSString`s.
- About this last point, I'll also say that `NSArray` is not the most efficient way to ask the developer for input. I'd rather create a `NSObject` subclass like `IRImageTableViewRow` with some properties like `title` and `image` and ask the developer for a NSArray of those objects, or either __really deeply__ explain how the data is provided in the current way.

And I think that's it. Also, note there's a problem with the scrolling of the table view when it comes to loading the images. It gets really lagged. I haven't investigated what may be causing this lag, but my guess is that `SDWebImage` is not really necessary for just loading a few images from a URL, or that some process that is supposed to be asynchronous because of its expensive cost is being performed synchronously.