carlj / cjamacros Goto Github PK
View Code? Open in Web Editor NEWMacro collection for daily usage
License: MIT License
Macro collection for daily usage
License: MIT License
Since iOS8 UIScreen is interface oriented.
For the line:
Shouldn't the fabsf be fabs since the comparison is to a double instead of a float? I get a compiler warning about it.
Xcode 6 beta 3 complains that _iOS_7_0 is an undeclared identifier.
Version number changes cause the break. Reverting to the previous numbers corrects the issue:
@@ -128,7 +128,7 @@ _lambda \
//If the symbol for iOS 6.0 isnt defined, define it.
#ifndef NSFoundationVersionNumber_iOS_6_0
-#define NSFoundationVersionNumber_iOS_6_0 992.00
+#define NSFoundationVersionNumber_iOS_6_0 993.00
#endif
#ifdef NSFoundationVersionNumber_iOS_6_0
@@ -137,7 +137,7 @@ _lambda \
//If the symbol for iOS 6.1 isnt defined, define it.
#ifndef NSFoundationVersionNumber_iOS_6_1
-#define NSFoundationVersionNumber_iOS_6_1 992.00
+#define NSFoundationVersionNumber_iOS_6_1 993.00
#endif
#ifdef NSFoundationVersionNumber_iOS_6_1
@@ -146,7 +146,7 @@ _lambda \
//If the symbol for iOS 7 isnt defined, define it.
#ifndef NSFoundationVersionNumber_iOS_7_0
-#define NSFoundationVersionNumber_iOS_7_0 1047.20
+#define NSFoundationVersionNumber_iOS_7_0 1047.00
#endif
If you compile this code with Xcode 6 (works fine in Xcode 5):
if(SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(_iOS_7_0)) {
/*Do iOS7 stuff*/
} else {
/*Do iOS6 stuff*/
}
Then run it on an iOS7 device, the else block will fire incorrectly (as if the device wasn't greater than or equal to iOS 7.0).
(On iOS8 devices the >= iOS7 block fires as expected)
I found myself repeating many times the code ([self.delegate respondsToSelect...)
I have buggy implementation which uses NSInvocation, va_args, requires parameters to be ancestors of NSObject and nil-termination. I can share it with you. I also will try to ask on SO.
in ios8.1 NSObjCRuntime.h
the default NSFoundationVersionNumber is different from CJA Codes, should it be fixed?
I think it may be implemented by avoiding use of macro, like some utility class and with class methods. And then used in Swift with it's own syntax, Xcode automatically converts API from Objective-C to Swift.
Hi,
Why don't you push the podspec file to the repository https://github.com/CocoaPods/Specs ?
The macro to determine whether the device is an iPhone 6+ is incorrectly calculated. The size should test for a bounds height of 736.0f. The iPhone 6+ virtual pixel resolution is 2208px x 1242px and it runs at @3x retina. Therefore:
2208 / 3 = 736.
Pull request coming...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.