Top "Foundation" questions

Foundation is a framework written in Objective-C that implements many useful classes and functions.

How to pass pan gesture to UICollectionVIew from UICollectionViewCell?

I have a UICollectionView implementing a grid-based layout of custom UICollectionViewCells. To allow cells to respond to dragging, I individually …

ios objective-c foundation
How to check for API availability in Xcode 9

I'm using he UserNotification framework that is available only in iOS 10. I am declaring a method that uses this framework …

objective-c ios10 foundation
Popover view for iPhone using XCode 5

I wanted to reuse the popover for iPhone described in this video which is exactly what I need. The problem …

iphone ios objective-c xcode foundation
Difference between Foundation Framework and Core Foundation Framework?

I try to get the hang of it, but for now both seem the same thing to me. However, Xcode …

objective-c cocoa cocoa-touch foundation core-foundation
How to use KVO for UserDefaults in Swift?

I'm rewriting parts of an app, and found this code: fileprivate let defaults = UserDefaults.standard func storeValue(_ value: AnyObject, forKey …

ios swift key-value-observing foundation
NSDictionary +dictionaryWithDictionary or -copy?

Which is considered the better way to derive a new dictionary from an original one: [NSDictionary dictionaryWithDictionary:otherDictionary]; or [otherDictionary …

objective-c foundation
Writing Data to an NSOutputStream in Swift 3

The solution of this question no longer works with Swift 3. There is no longer a property bytes of Data (formerly …

swift nsdata foundation swift3 nsoutputstream
"unrecognized selector sent to class" when calling category method from a library

Problem This question may seem a bit long, but I try to give as much information as possible, since I …

objective-c cocoa extension-methods foundation unrecognized-selector
CoreFoundation vs Foundation

In iPhone development, speed is of the essence. Does anyone know if there is a speed difference between using a …

cocoa core-foundation foundation
CoreFoundation Trap error "Thread1:EXC_BREAKPOINT (code=EXC_ARM_BREAKPOINT, subcode=0xdefe)"

i need your help i've got this frustrating "random" error. The app is compose of one Mapviewcontroller and a collectionview …

ios exception core-data foundation nsorderedset