Top "Objective-c" questions

This tag should be used only on questions that are about Objective-C features or depend on code in the language.

Disable Automatic Reference Counting for Some Files

I have downloaded the iOS 5 SDK and found that ARC is a great feature of the new Apple compiler. For …

objective-c ios5 automatic-ref-counting
Specifying one Dimension of Cells in UICollectionView using Auto Layout

In iOS 8 the UICollectionViewFlowLayout supports automatically resizing cells based on their own content size. This resizes the cells in both …

ios objective-c uicollectionview autolayout
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
Unrecognized Selector Sent to Instance [NSCFString subarrayWithRange:]

I have the following code which is producing this error. I cannot understand why the subarrayWithRange message is being sent …

objective-c ios4 nsarray unrecognized-selector
How can I disable landscape orientation?

I am making an iPhone app and I need it to be in portrait mode, so if the user moves …

iphone objective-c ios xcode orientation
Declaration/definition of variables locations in ObjectiveC?

Ever since starting to work on iOS apps and objective C I've been really puzzled by the different locations where …

iphone objective-c ios ios5
Appending NSDictionary to other NSDictionary

I have one NSDictionary and it loads up UITableView. If a user scrolls more and more, I call API and …

objective-c ios uitableview nsdictionary
Where are ${EXECUTABLE_NAME} and ${PRODUCT_NAME} defined

Where can I find information on how to modify these ${EXECUTABLE_NAME} ${PRODUCT_NAME} These are only displayed in .plist …

iphone objective-c ios xcode plist
"Auto Layout still required after executing -layoutSubviews" with UITableViewCell subclass

Using XCode 4.5 and iOS 6, I'm developing an app with a simple table view with custom cells. I've done this a …

objective-c ios xcode4.5 autolayout