iOS-NBUCore icon indicating copy to clipboard operation
iOS-NBUCore copied to clipboard

does it work on xcode6 & ios8.2 now?

Open sunuslee opened this issue 9 years ago • 7 comments

hi, i just use this simple code to test, but get no warnings: my baseSDK is ios8.2 and deployment target is 6.0..

UIView *testView = [[UIView alloc] initWithFrame:self.window.bounds];
[testView setLayoutMargins:UIEdgeInsetsZero];

i think the setLayoutMagins , should be introduced in ios8.

@property (nonatomic) BOOL preservesSuperviewLayoutMargins NS_AVAILABLE_IOS(8_0);

is there something i need to be noticed? thanks!

sunuslee avatar Apr 02 '15 14:04 sunuslee

You make this #define just before importing NBUAvailability.h.

We may need to add entries for 8.2 and 8.3 in the bottom of that file though.

rivera-ernesto avatar Apr 02 '15 22:04 rivera-ernesto

i tried, it didn't give me any warnings. are you sure this work?

also, i am putting another some test program here, still, strange.

could you please clone that repo and tell me what's going on? thanks!

https://github.com/sunuslee/macapi-tester

sunuslee avatar Apr 03 '15 03:04 sunuslee

it turn out to be the same situation like (https://github.com/sunuslee/macapi-tester) when i add

#if __IPHONE_OS_VERSION_SOFT_MAX_REQUIRED < __IPHONE_8_2
    #undef __AVAILABILITY_INTERNAL__IPHONE_8_2
    #define __AVAILABILITY_INTERNAL__IPHONE_8_2 __NBU_AVAILABILITY_STARTING("8.2")
    #define __NBU_APICHECK_8_2(_ios)            __NBU_AVAILABILITY_STARTING("8.2")
#else
    #define __NBU_APICHECK_8_2(_ios)            CF_AVAILABLE_IOS(_ios)
#endif

to this file, then, in my class(AppDelegate)

add a property (same as UIView) @property (nonatomic) UIEdgeInsets layoutMargins NS_AVAILABLE_IOS(8_0);

then,

[self setLayoutMargins:UIEdgeInsetsZero];

gets the right warning.

screen shot 2015-04-03 at 11 51 58 am

but no luck for

UIView *testView = [[UIView alloc] initWithFrame:self.window.bounds];
[testView setLayoutMargins:UIEdgeInsetsZero];

sunuslee avatar Apr 03 '15 03:04 sunuslee

Did you try adding the entries for 8.1 ~ .3 to NBUAvailability.h?

rivera-ernesto avatar Apr 03 '15 12:04 rivera-ernesto

yeah, it turned out that, i have to set enable_module to NO, so that those macros can work.

sunuslee avatar Apr 08 '15 16:04 sunuslee

Nice. Could you pull request your changes?

rivera-ernesto avatar Apr 08 '15 20:04 rivera-ernesto

I updated the library and set enable_module to NO but still macros don't show up.

rivera-ernesto avatar May 06 '16 18:05 rivera-ernesto