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.

How to use nonnull and nullable Objective-C keywords in block-based API method

Consider the following method - (void)methodWithArg:(NSString *)arg1 andArg:(NSString *)arg2 completionHandler:(void (^)(NSArray *results, NSError *error))completionHandler; With …

objective-c xcode block nullable
Objective-C 101 (retain vs assign) NSString

A 101 question Let's say i'm making database of cars and each car object is defined as: #import <UIKit/UIKit.…

ios objective-c iphone nsstring retain
Changing UITextField Placeholder font

I'm changing the placeholder text color with the following code, but when I try to add NSFontAttribute I get the …

ios objective-c uitextfield
sizeWithFont method is deprecated. boundingRectWithSize returns an unexpected value

In iOS7, sizeWithFont is deprecated, so I am using boundingRectWithSize(which returns a CGRect value). My code: UIFont *fontText = [UIFont …

objective-c nsstring ios7 uilabel
Objective c checking whether text field is empty

Here's the code: - (IBAction) charlieInputText:(id)sender { //getting value from text field when entered charlieInputSelf = [sender stringValue]; if (charlieInputSelf != @"") { //(…

objective-c xcode variables nstextfield
If no Table View results, display "No Results" on screen

I have a tableview, where sometimes there might not be any results to list, so I would like to put …

ios objective-c uitableview parse-platform
How can I detect the dismissal of a modal view controller in the parent view controller?

Possible Duplicate: Call Function in Underlying ViewController as Modal View Controller is Dismissed I've tried almost everything. Here's what I've …

iphone objective-c ios xcode modalviewcontroller
Learning the basics of UIScrollView

I've been having a very hard time finding good examples of UIScrollView. Even Apple's UIScrollView Suite I find a bit …

iphone objective-c iphone-sdk-3.0 uiscrollview
Objective C - How do I use initWithCoder method?

I have the following method for my class which intends to load a nib file and instantiate the object: - (…

objective-c cocoa-touch nscoder