objc-codegenutils
objc-codegenutils copied to clipboard
Adds class methods and strongly typed return values.
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.
This is amazing. But let's not introduce a mode. Please just change the behavior.
I removed the mode and added some class generator methods (instead of printing strings). Let me know what you think.
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.
In regards to the first comment about floating point comparisons, what kind of fix are you looking for?
- The more correct comparison with a float (i.e. just changing 0 to 0.0f)?
- Using an epsilon in the comparison?
- Using a boolean to keep track of the visibility, eliminating all floating point comparisons entirely?
Probably the third one.
This all looks good. You should update the docs before this is merged.
I improved the support for UICollectionViews, and it now handles duplicate identifiers much better. The read me was also updated as you suggested.
@puls @oy65 This looks like exactly what my project needs. But is this project still going to be maintained? Any recommendations for similar tools?