objc-codegenutils icon indicating copy to clipboard operation
objc-codegenutils copied to clipboard

Adds class methods and strongly typed return values.

Open swiftal64 opened this issue 11 years ago • 8 comments

See the updated example project for how category methods and strong types work.

Here's a quick example:

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:CGTAMainStoryboardName bundle:nil];
CGTADetailViewController *detailViewController = [storyboard instantiateViewControllerWithIdentifier:CGTAMainStoryboardDetailViewControllerIdentifier];

becomes

CGTADetailViewController *detailViewController = [CGTAMainStoryboard instantiateDetailViewController];

Segues, collection view cells, and table view cells are scoped to the view controller.

swiftal64 avatar Apr 02 '14 06:04 swiftal64

This is amazing. But let's not introduce a mode. Please just change the behavior.

puls avatar Apr 02 '14 17:04 puls

I removed the mode and added some class generator methods (instead of printing strings). Let me know what you think.

swiftal64 avatar Apr 03 '14 04:04 swiftal64

I implemented your recommendations, and added a new storyboard feature which caches the constraint constant values. If you think this should be a separate feature, let me know and I'll put it into another branch.

swiftal64 avatar Apr 09 '14 22:04 swiftal64

In regards to the first comment about floating point comparisons, what kind of fix are you looking for?

  1. The more correct comparison with a float (i.e. just changing 0 to 0.0f)?
  2. Using an epsilon in the comparison?
  3. Using a boolean to keep track of the visibility, eliminating all floating point comparisons entirely?

swiftal64 avatar Apr 12 '14 00:04 swiftal64

Probably the third one.

puls avatar Apr 12 '14 15:04 puls

This all looks good. You should update the docs before this is merged.

puls avatar May 08 '14 23:05 puls

I improved the support for UICollectionViews, and it now handles duplicate identifiers much better. The read me was also updated as you suggested.

swiftal64 avatar May 12 '14 16:05 swiftal64

@puls @oy65 This looks like exactly what my project needs. But is this project still going to be maintained? Any recommendations for similar tools?

jshier avatar Feb 10 '15 16:02 jshier