Top "Foundation" questions

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

Adding an object at a specific index of an NSMutableArray

How can an object be added at a specific index of an NSMutableArray? How is an object added to the …

objective-c nsmutablearray foundation
Comparing NSDates without time component

In a swift playground, I have been using NSDate.date() But, this always appears with the time element appended. For …

ios time swift nsdate foundation
How to use NSIndexSet

In Objective-C, my program opens a window and displays a table. I want to have a specified row of the …

cocoa foundation nsindexset
Is there a constant for the maximum CGFloat value?

I need to create a CGSize to compute text height of an arbitrary text with arbitrary length. UIKit has this …

objective-c ios foundation core-foundation cgfloat
How to Get the Title of a HTML Page Displayed in UIWebView?

I need to extract the contents of the title tag from an HTML page displayed in a UIWebView. What is …

ios objective-c iphone uiwebview foundation
Replace substring of NSAttributedString with another NSAttributedString

I want to replace a substring (e.g. @"replace") of an NSAttributedString with another NSAttributedString. I am looking for an …

string cocoa replace nsattributedstring foundation
Print the size (megabytes) of Data in Swift

I have a variable fileData of Data type and I am struggling to find how to print the size of …

ios swift cocoa-touch nsdata foundation
About -(NSDictionary)dictionaryWithObjectsAndKeys: and

I got a really interesting question. Inside one of my classes I declared a very simple instance method -(NSDictionary)…

iphone nsdictionary foundation
How to calculate the age based on NSDate

how to calculate the age based on the birth date in this format 6/24/1976 mon/date/year...

ios date nsdate foundation