Coder Social home page Coder Social logo

cjamacros's People

Contributors

bryant1410 avatar carlj avatar diehardest avatar readmecritic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cjamacros's Issues

fabsf vs fabs

For the line:

define SYSTEM_VERSION_EQUAL_TO(_gVersion) ( fabsf(NSFoundationVersionNumber - _gVersion) < DBL_EPSILON )

Shouldn't the fabsf be fabs since the comparison is to a double instead of a float? I get a compiler warning about it.

iOS8 Fixes Break iOS6/7 Identification

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

When compiled with Xcode 6, iOS 7 is treated as if iOS6 was matched.

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)

[FR]Please add macros invoke_method_if_responds_to_selector

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.

NSFoundationVersionNumber Error?

in ios8.1 NSObjCRuntime.h

if TARGET_OS_IPHONE

define NSFoundationVersionNumber_iPhoneOS_2_0 678.24

define NSFoundationVersionNumber_iPhoneOS_2_1 678.26

define NSFoundationVersionNumber_iPhoneOS_2_2 678.29

define NSFoundationVersionNumber_iPhoneOS_3_0 678.47

define NSFoundationVersionNumber_iPhoneOS_3_1 678.51

define NSFoundationVersionNumber_iPhoneOS_3_2 678.60

define NSFoundationVersionNumber_iOS_4_0 751.32

define NSFoundationVersionNumber_iOS_4_1 751.37

define NSFoundationVersionNumber_iOS_4_2 751.49

define NSFoundationVersionNumber_iOS_4_3 751.49

define NSFoundationVersionNumber_iOS_5_0 881.00

define NSFoundationVersionNumber_iOS_5_1 890.10

define NSFoundationVersionNumber_iOS_6_0 992.00

define NSFoundationVersionNumber_iOS_6_1 993.00

define NSFoundationVersionNumber_iOS_7_0 1047.20

define NSFoundationVersionNumber_iOS_7_1 1047.25

endif

the default NSFoundationVersionNumber is different from CJA Codes, should it be fixed?

[FR] Swift version

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.

iPhone 6 Plus detection incorrect

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...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.