December 2018
Intermediate to advanced
414 pages
10h 19m
English
The first step would be to rename the classes and enums so they don't expose this ugly FV prefix:
typedef NS_ENUM(NSInteger, FVMeasureUnit) { /* ... */} NS_SWIFT_NAME(MeasureUnit); // notice the attribute is 'after'// And for interfaces the attribute is beforeNS_SWIFT_NAME(Measure)@interface FVMeasure : NSObject
We can now rewrite our Swift to the following:
let measure = Measure(amount: 10, unit: MeasureUnit.cups)
The class and enum names are quite better but we can go further.
Read now
Unlock full access