Created
November 16, 2016 15:11
-
-
Save jyliang/338eba135bc7b7ec60e30ca685a8e22a to your computer and use it in GitHub Desktop.
Hacking Objective C
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://docs.google.com/presentation/d/19AiyALt7-t5MZLBgTubaJ66njM2GLTO54oOiMG1KAog/edit#slide=id.g13a6caa795_0_7 | |
#define BMTDollarReader(fieldName) \ | |
- (double)fieldName ## Value { \ | |
return BMTCentsToDollars(self.fieldName ## CentsValue); \ | |
} \ | |
\ | |
- (NSNumber *)fieldName { \ | |
return self.fieldName ## Cents ? @(self.fieldName ## Value) : nil; \ | |
} \ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment