Re: Value of the MAC_OS_X_VERSION_MIN_REQUIRED macro

2016-02-20 Thread Quincey Morris
On Feb 20, 2016, at 23:07 , Ilya Kulakov wrote: > > Checking version of the OS is the least problem. Providing an implementation > is the actual one. > I want to use weaks, because they are easier for developers who are tought by > new documentation and didn't learn to

Re: Value of the MAC_OS_X_VERSION_MIN_REQUIRED macro

2016-02-20 Thread Ilya Kulakov
Quincey, Checking version of the OS is the least problem. Providing an implementation is the actual one. I want to use weaks, because they are easier for developers who are tought by new documentation and didn't learn to explicitly nullify references to objects like delegate. Not saying that

Re: Value of the MAC_OS_X_VERSION_MIN_REQUIRED macro

2016-02-20 Thread Quincey Morris
On Feb 20, 2016, at 21:03 , Ilya Kulakov wrote: > > There should be an ability to makes this decision in runtime I guess. Well, there is, if you mean that you make the decision — -[NSProcessInfo isOperatingSystemAtLeastVersion:]. I’m not sure I understand, though, why

Re: Value of the MAC_OS_X_VERSION_MIN_REQUIRED macro

2016-02-20 Thread Ilya Kulakov
Indeed, I didn't think of that. There should be an ability to makes this decision in runtime I guess. Best Regards Ilya Kulakov > On 21 февр. 2016 г., at 3:42, Jean-Daniel Dupas wrote: > > It is unsafe to use availability conditional in headers. > You can’t guarantee

UINavigationController: Clean interactive transition to view controller without navigation bar?

2016-02-20 Thread Daniel Stenmark
(Already asked on StackOverflow, but might as well cover my bases here as well.) I have a view controller navigation hierarchy where only the top view controller has its navigation bar hidden. Normal pushing/popping is fine and works as expected. However, when the pop is interactive

Re: Value of the MAC_OS_X_VERSION_MIN_REQUIRED macro

2016-02-20 Thread Jean-Daniel Dupas
It is unsafe to use availability conditional in headers. You can’t guarantee that the framework client will has the same settings that what was used to compile the framework. That said, if you want to use weak when compiling for ARC and assign otherwise, you can just use #if

Value of the MAC_OS_X_VERSION_MIN_REQUIRED macro

2016-02-20 Thread Ilya Kulakov
Hi, I would like to add support for ARC's weaks to my framework that supports Mac OS X down to 10.6 My current solution is: #if defined(MAC_OS_X_VERSION_MIN_REQUIRED) && MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 @property (weak) NSObject *delegate; #else @property (assign) NSObject

Re: Can an NSArray ever have a count of -1?

2016-02-20 Thread Quincey Morris
On Feb 20, 2016, at 00:25 , Jean-Daniel Dupas wrote: > > Even if swift is planning to provide a Foundation framework, one of the > strong requirement is that it must be source compatible with the Apple > Foundation, as that is the one that will be used on Apple platforms.

Re: Can an NSArray ever have a count of -1?

2016-02-20 Thread Jean-Daniel Dupas
> Le 20 févr. 2016 à 07:28, Quincey Morris > a écrit : > > On Feb 19, 2016, at 22:14 , Gerriet M. Denkmann wrote: >> >> Is there (yet) a Swift version of ‘[NSString stringWithFormat: “%08lx”, >> (someCast) someValue]’ ? > > No, and