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.

Cannot find protocol declaration

I have two view controllers A and B, and they both have each other as their delegates. When I did …

objective-c cocoa-touch protocols
Extracting a string with substringWithRange: gives "index out of bounds"

When I try to extract a string from a larger string it gives me a range or index out of …

objective-c cocoa nsstring nsrange
How to specify size for iPhone 6/7 customised edge-to-edge image?

Say I want a bundled image to take up all available screen width in an iPhone app - for example …

ios objective-c iphone cocoa-touch iphone-6
Converting all text to lower case in Objective-C

I have a textfield in my iOS app where the user is supposed to input some text. But I was …

objective-c ios lowercase
Removing all CALayer's sublayers

I have trouble with deleting all of layer's sublayers. I currently do this manually, but that brings unnecessary clutter. I …

objective-c cocoa core-animation
Display local image in UIImageView

How do I display an image in the UIImageView component from the hard drive? I have a local folder called "…

ios objective-c iphone imagesource
When is it better to use an NSSet over an NSArray?

I have used NSSets many times in my apps, but I have never created one myself. When is it better …

ios objective-c arrays cocoa cocoa-touch
How to select range of values when using arc4random()

Can I set a range of numbers when using arc4random()? For example 50-100 only.

ios objective-c arc4random
How to use Speech Recognition inside the iOS SDK?

I know that there is no public API for the SIRI-Services, but is there an API for simple Speech-Recognition? So …

ios objective-c speech-recognition siri
How do I create a Cocoa window programmatically?

My Cocoa app needs some small dynamically generated windows. How can I programmatically create Cocoa windows at runtime? This is …

objective-c cocoa nswindow