Top "Cocoa" questions

Cocoa is Apple's application-development framework for macOS, consisting of Foundation, Application Kit, and Core Data.

Xcode 6 iOS Creating a Cocoa Touch Framework - Architectures issues

I'm trying to make a dynamic framework for an iOS app. Thanks to the new version of Xcode (6) we can …

cocoa ios8 xcode6 dynamic-library ios-universal-framework
"Collection was mutated while being enumerated" on executeFetchRequest

I'm stuck on a problem for hours now and having read everything about this on stackoverflow (and apply every advices …

multithreading cocoa core-data
How to save a NSImage as a new file

How can I save a NSImage as a new file (png, jpg, ...) in a certain directory?

cocoa image macos file nsimage
Number of occurrences of a substring in an NSString?

How can I get the number of times an NSString (for example, @"cake") appears in a larger NSString (for example, @"…

objective-c cocoa nsstring substring
Iterate through files in a folder and its subfolders using Swift's FileManager

I'm quite new to programming a Swift and I'm trying to iterate through the files in a folder. I took …

swift cocoa nsfilemanager
How does an underscore in front of a variable in a cocoa objective-c class work?

I've seen in a few iPhone examples that attributes have used an underscore _ in front of the variable. Does anyone …

objective-c cocoa-touch cocoa variables syntax
NSMutableArray - force the array to hold specific object type only

Is there a way to force NSMutableArray to hold one specific object type only? I have classes definitions as follow: @…

objective-c cocoa nsmutablearray
How can I get the first element in an NSDictionary?

I have an array of NSDictionaries. How can I pull out the first element in the dictionary? NSArray *messages = [[results …

iphone objective-c cocoa cocoa-touch nsdictionary
using dispatch_sync in Grand Central Dispatch

Can anyone explain with really clear use cases what the purpose of dispatch_sync in GCD is for? I can't …

cocoa ios ios4 grand-central-dispatch
How to join NSArray elements into an NSString?

Given an NSArray of NSStrings, is there a quick way to join them together into a single NSString (with a …

cocoa string