Re: NSData from dispatch_data_t?

2018-10-30 Thread Ryan Dignard
To get the size of the dispatch data you can call dispatch_data_get_size(dispatch_data_t) on it which would let you create an NSData object. https://developer.apple.com/documentation/dispatch/1452977-dispatch_data_get_size?language=objc -Ryan On Tue, Oct 30, 2018 at 7:26 PM Carl Hoefs wrote:

Re: Conditionally declaring a BOOL in a .m file to be accessed in a .c function

2016-09-20 Thread Ryan Dignard
This doesn't work? in the .m file at file scope BOOL condition = NO; in the .c file at file scope extern BOOL condition; On Tue, Sep 20, 2016 at 8:14 AM, Alex Zavatone wrote: > I've been beating my head against the wall on this one. > > I'm trying to evaluate a condition and

Re: Resend: array = [NSArray new] or array = [NSArray array]?

2016-08-19 Thread Ryan Dignard
Under ARC there should be no appreciable difference. People who prefer +new will generally point out it's a keyword or operator in other languages so its meaning is not ambiguous. With manual reference counting, the difference is that +array is autorelease where as with +new your code is

Re: Core Data or not

2016-08-06 Thread Ryan Dignard
To do it as one fetch you can set your predicate (or a sub predicate) as: [NSPredicate predicateWithFormat:@"%K in %@", primaryKey, keys] where primaryKey is the name of your ID property, and keys is an array of ID values which are "interesting" (as defined by the rest of your code). On Sat, Aug

Re: BOOL parameter passed as nil object

2016-04-18 Thread Ryan Dignard
To answer your second question consider BOOL b = (BOOL)someObj; if someObj happens to equal something like 0x12345600 the value of b will be NO because casting from a pointer to a char will return the least significant byte. For your first question I don't know exactly but it doesn't look safe;

Re: Getting a double-click on a text label

2016-04-17 Thread Ryan Dignard
Would NSClickGestureRecognizer work? I've done this on iOS with the equivalent UITapGestureRecognizer. On Sun, Apr 17, 2016 at 5:45 PM, Graham Cox wrote: > Hi al, > > Here’s something I thought would be trivial, turns out to be non-obvious. > > I have a text label

Re: Image from UIView - text jagged...

2016-01-20 Thread Ryan Dignard
Have you tried `UIGraphicsBeginImageContextWithOptions(item.bounds.size, NO, 0.0)` ? I've never had problems with the implicit scale provided by the last parameter being `0.0` On Wed, Jan 20, 2016 at 11:17 AM, Eric E. Dolecki wrote: > I am creating images from what I'll

Re: Does NSObject have a super ?

2015-06-24 Thread Ryan Dignard
yea, you can run class_getSuperclass([NSObject class]) to confirm On Wed, Jun 24, 2015 at 10:50 AM, Dave d...@looktowindward.com wrote: Hi, Quick question, does the “super” of NSObject == nil? Cheers Dave ___ Cocoa-dev mailing list

Re: Cannot create an NSPersistentStoreCoordinator with a nil model

2015-05-11 Thread Ryan Dignard
It may be advantage to log whether the model file exists and if it does exist if the permissions are correct. On Mon, May 11, 2015 at 1:06 PM, Alex Kac a...@webis.net wrote: So I've only seen this on OS X crashlytics, but one of my engineers says he's seen some logs on iOS as well. So I'm not

Re: NIB for Cocoa Standard Alert Sheet

2015-04-20 Thread Ryan Dignard
You could create an UIAlertSheet show it and all that, then call recursiveDescription on the sheet which will tell you the description of all the views it has. You should be able to assemble a similar looking view with that info. On Mon, Apr 20, 2015 at 11:51 AM, Dave d...@looktowindward.com