iOS-NBUCore
iOS-NBUCore copied to clipboard
does it work on xcode6 & ios8.2 now?
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!
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.
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
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.
but no luck for
UIView *testView = [[UIView alloc] initWithFrame:self.window.bounds];
[testView setLayoutMargins:UIEdgeInsetsZero];
Did you try adding the entries for 8.1 ~ .3 to NBUAvailability.h
?
yeah, it turned out that, i have to set enable_module to NO, so that those macros can work.
Nice. Could you pull request your changes?
I updated the library and set enable_module
to NO
but still macros don't show up.