Githawk: Asset generation similar to Android R

Created on 16 Nov 2017  路  5Comments  路  Source: GitHawkApp/GitHawk

I've seen some things that allow you to have more compile safety for initializing image assets, XIBs, and storyboards. I'd love to get more safety around loading assets. Anyone have any favorites?

馃幆 project management

Most helpful comment

using it in prod and it's been great for our needs

there are limitations:

using convenience dequeue methods that make cell instantiation safer requires registry of that cell even if it's a UITableViewCell. Using a special style of a cell like UITableViewCellValue1 requires a class that basically instantiates that way. Final caveat is that it only supports nibs that are used to house one view, and there isn't support for views that can instantiate from multiple nibs.

so basically if you have a nib structured like this:

MyNib:
   | > ClassA
      | > ClassB Contents
      | ...
   | > ClassB
      | > ClassB Contents

there's no support for picking out ClassB through the convenience methods

All 5 comments

Like loading views from nibs & vc from storyboard?

re: assets, I just use #imageLiteral

https://github.com/heshamsalman/ReusableViews#convenient-instantiation-of-a-view-from-a-nib

Hell ya, that鈥檚 exactly what I want to do.

Sent with GitHawk

using it in prod and it's been great for our needs

there are limitations:

using convenience dequeue methods that make cell instantiation safer requires registry of that cell even if it's a UITableViewCell. Using a special style of a cell like UITableViewCellValue1 requires a class that basically instantiates that way. Final caveat is that it only supports nibs that are used to house one view, and there isn't support for views that can instantiate from multiple nibs.

so basically if you have a nib structured like this:

MyNib:
   | > ClassA
      | > ClassB Contents
      | ...
   | > ClassB
      | > ClassB Contents

there's no support for picking out ClassB through the convenience methods

That's weird, 2 classes in one xib? Who does that? 馃檯

SwiftGen looks awesome

https://github.com/SwiftGen/SwiftGen

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rnystrom picture rnystrom  路  3Comments

BasThomas picture BasThomas  路  3Comments

BasThomas picture BasThomas  路  3Comments

rnystrom picture rnystrom  路  3Comments

BasThomas picture BasThomas  路  3Comments