clearsightstudio/ProMotion — pull request #265 by bitgangsta (2013-08-14 02:25:37+00:00)
Title: Updating Tabs :icon attribute to accept UIImage

Hi,

I was trying to use ProMotion with FontAwesomeKit, a CocoaPod library that lets me use FontAwesome's icons throughout the application. However, when I wanted to use an icon for a tab, it would crash. Upon looking into it, it seems the assumption was made that the icon would be a name of a file, and automatically load / create a UIImage object.

For example:
```ruby
def on_load
image = FontAwesomeKit.imageForIcon(FAKIconHeart, imageSize: CGSizeMake(30,30), fontSize: 29, attributes: nil)
set_tab_bar_item icon: image
```

This (very small) patch detects if a string is passed in, and will create a UIImage. But if you pass an object in, it will use it instead. I think this is preferable behavior, as it does not change the interface for existing code, but enables folks to pass their own UIImage in for reasons like I described.

I didn't see any specs related to the "Tabs" container, or I would have added a test for this.

Let me know if you have any thoughts. Open to making a change.

Regards,
Daniel