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.

Add a multiple buttons to a view programmatically, call the same method, determine which button it was

I want to programmatically add multiple UIButtons to a view - the number of buttons is unknown at compile time. …

iphone objective-c xcode programmatically-created
Indent the text in a UITextField

My question is as simple as the title, but here's a little more: I have a UITextField, on which I've …

iphone objective-c ios cocoa-touch uitextfield
Join an Array in Objective-C

I'm looking for a method of turning a NSMutableArray into a string. Is there anything on a par with this …

objective-c nsmutablearray nsarray
Change the navigation bar's font

The question is plain easy and simple, the answer unfortunately not. How can you change the font of the text …

iphone objective-c uinavigationcontroller uinavigationbar
iOS taking photo programmatically

I know this is possible, saw this in some apps (iGotYa is I believe the most famous). I know how …

objective-c ios xcode photo
iCloud basics and code sample

As a beginner, I'm struggling with iCloud. There are some samples, but they are usually quite detailed (on the developer …

iphone objective-c ios cocoa-touch icloud
How does an underscore in front of a variable in a cocoa objective-c class work?

I've seen in a few iPhone examples that attributes have used an underscore _ in front of the variable. Does anyone …

objective-c cocoa-touch cocoa variables syntax
NSMutableArray - force the array to hold specific object type only

Is there a way to force NSMutableArray to hold one specific object type only? I have classes definitions as follow: @…

objective-c cocoa nsmutablearray
Adjust alpha of UIColor

I set a UIColor using rgb to a background of a UILabel. I'm trying to adjust the alpha only. How …

ios objective-c alpha uicolor
UILabel sizeToFit method not working properly

I'm trying to show a long chunk of text inside a UILabel in one line. The UILabel is a subview …

ios objective-c uiscrollview uilabel sizetofit