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.

Implementing NSCopying

I've read the NSCopying docs but I am still very unsure about how to implement what is required. My class …

iphone ios objective-c nscopying
converting timestamp to nsdate format

I want to convert my timestamp value 1308031456 to NSDate format (which yields the value Tue, 14 Jun 2011 06:04:16 GMT in online web …

objective-c iphone swift nsdate
NSLayoutConstraints and setting the width/height of a view dynamically

I have a question about setting the size of a view to which i'm applying some layout constraints. How can …

objective-c ios xcode nslayoutconstraint
Convert string to float in Objective-C

How do I convert a string to a float in Objective-C? I am trying to multiply a couple of strings …

objective-c nsstring string-conversion
How to create directory using Swift code (NSFileManager)

I'm having some trouble with converting Objective-C code to create a directory for Swift. Objective-C: NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, …

ios objective-c swift nsfilemanager nsdocumentdirectory
Protected methods in Objective-C

What is the equivalent to protected methods in Objective-C? I want to define methods which only the derived classes may …

objective-c
iPhone how to get UITextField's text while typing?

I'm trying to show changes made to a UITextField on a separate UILabel. Is there a way to capture full …

iphone objective-c ios uitextfield
2D arrays using NSMutableArray

I need to create a mutable two-dimensional array in Objective-C. For example I have: NSMutableArray *sections; NSMutableArray *rows; Each item …

objective-c cocoa cocoa-touch multidimensional-array nsmutablearray
What is the Objective-C equivalent for "toString()", for use with NSLog?

Is there a method that I can override in my custom classes so that when NSLog(@"%@", myObject) is called, it …

objective-c tostring nslog
Drop Shadow on UITextField text

Is it possible to add a shadow to the text in a UITextField?

iphone objective-c uikit uitextfield shadow