Questions tagged [foundation]

Foundation is a framework written in Objective-C that implements many useful classes and functions. For the responsive front-end framework Zurb Foundation, please use the tag [zurb-foundation].

Foundation is a framework written in Objective-C that implements many useful classes and functions. Foundation is used by almost any Objective-C application, as it provides memory management and other runtime features, without the need to use the Objective-C runtime API directly.


References

Related Topics

Separate Topics

This topic is often confused with:

941 questions
0
votes
1 answer

memory management guidelines on foundation functions

While memory management for the foundation classes are consistent and documented, i was surprised to find (via the friendly EXC_BAD_ACCESS) that Foundation functions like e.g NSStringFromSelector() seem to return pointers to constant storage - which…
Georg Fritzsche
  • 97,545
  • 26
  • 194
  • 236
0
votes
2 answers

Questions About The Foundation And NS Library

I'm a Objective-C learner and I don't have a Mac, then I need to use my Linux with GNUStep, but if I develop my own program on it, the end-user will need to have GNUStep(like .Net) installed and then I started thinking how can I solve this, then I…
Nathan Campos
  • 28,769
  • 59
  • 194
  • 300
0
votes
2 answers

Turning NSDictionary into a plist string, not writing it to a file, in PyObjC

Fair warning: I know absolutely no Objective-C. I am using the Foundation module for PyObjC. I have a dictionary which I use to create an NSDictionary. An example: from Foundation import NSDictionary d = {'a': 1, 'b': 2, 'c': 3} nsd =…
2rs2ts
  • 10,662
  • 10
  • 51
  • 95
0
votes
2 answers

How to reorder an Array of Dictionaries as per random order of keys/attributes (neither ascending nor descending)

I have an array of dictionaries as below. NSMutableArray *newArray ({ { A = John; B = THAILAND; }, { A = Jack; B = US; } { A = Lee; B = BRAZIL; } { A = Brandon; …
0
votes
1 answer

iOS - Getting Notified for data insertion in NSMutableArray?

I am going to get Data for my application through Internet Object by Object and i want that each time the data has been updated or any object is added the current class that is using that class it gets notified that the data has been Updated.…
Quamber Ali
  • 2,170
  • 25
  • 46
0
votes
0 answers

Why does syntax highlighting for Foundation Objects turn off when not importing Foundation Framework

My *-Prefix.pch file looks like the following // // Prefix header for all source files of the 'stuff' target in the 'stuff' project // #import #ifndef __IPHONE_4_0 #warning "This project uses features only available in iOS SDK…
Awesome-o
  • 2,002
  • 1
  • 26
  • 38
0
votes
1 answer

Should I prefer factory (convenience) constructors over allocation and initialisation?

A lot of Foundation objects provide two interfaces for creation: The general NSObject init method: _array = [[NSMutableArray alloc] init]; A specialised factory method (convenience constructor), such as: _array = [NSMutableArray array]; I've…
sapi
  • 9,944
  • 8
  • 41
  • 71
0
votes
1 answer

Setting NotANumberSymbol to an empty string?

why NSNumberFormatter's method setNotANumberSymbol:(NSString *)string ignores the empty string as a parameter (@"")? It even ignores the string, if it contains only spaces and zeros (@" 0 0 0 ")? Is there any way to bypass this functionality, and to…
marko
  • 1,336
  • 2
  • 12
  • 25
0
votes
2 answers

NSString compare efficiency

String compares can be costly. There's some statistic floating around that says a very high percent of string compares can be eliminated by first comparing string sizes. So I'm curious to know whether the NSString compare: method takes this into…
stephen
  • 1,039
  • 14
  • 31
0
votes
3 answers

Error With Foundation.h

I learning Objective-C in Linux(Ubuntu), but when i tryed to compile my application that needs the Foundation headers i got an error saying that the file cannot be found, but i have installed the GNUstep development package(gnustep-devel). Here is…
Nathan Campos
  • 28,769
  • 59
  • 194
  • 300
0
votes
4 answers

Is there a bug in NSOperation in Mac OS X 10.6?

If I release an instance of NSOperation before sending -init to it I get a segmentation fault. Reasons I think this is valid code: Apple does this in its documentation. Gnustep does it in its implementation of NSNumber, so it's fairly certain that…
Georg Schölly
  • 124,188
  • 49
  • 220
  • 267
0
votes
1 answer

how to link uikit app on iphone?

I use ssh to iphone, and can compile console apps on iphone using clang or gcc. But now how can I link against UIKit? Compiler finds headers and stuck at linking. what args I should pass to clang? How can I check if I have the required static/shared…
exebook
  • 32,014
  • 33
  • 141
  • 226
0
votes
1 answer

Finding the number of PDFs in a folder

I have a button in an app that when clicked should cause a dialog box to open. The user then chooses a folder, clicks OK, and then the app displays the number of PDF files in that folder. I have the following code implemented below. How do I scan a…
Green Developer
  • 187
  • 4
  • 18
0
votes
1 answer

applicationBadgeNumber doesn't increment

So far I've found that I can't increment the app badge number through local notifications. So doing something like this: self.notification.applicationIconBadgeNumber = [[UIApplication sharedApplication] applicationIconBadgeNumber]+1; won't really…
Devfly
  • 2,495
  • 5
  • 38
  • 56
0
votes
3 answers

In which WWDC session video did Apple show the API for localized time interval formatting?

A long time ago I watched a WWDC session video where Apple introduced an API which would print a time interval in a humanly readable, localized form. Instead of printing a date when someone posted a comment, it was very easy to print a localized…
Proud Member
  • 40,078
  • 47
  • 146
  • 231