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.

make UILabel's text bold

I want to make UILabel's text bold infoLabel=[[UILabel alloc]initWithFrame:CGRectMake(90,150, 200, 30)]; [infoLabel setText:@"Drag 14 more Flavors"]; [infoLabel setBackgroundColor:[UIColor …

ios objective-c uilabel uifont textcolor
How to create a protocol with methods that are optional?

I noticed methods marked optional in several protocols defined in the iPhone SDK, such as the UIActionSheetDelegate protocol for example. …

iphone objective-c
How to Wait in Objective-C and Swift

I want to change my UILabel's text after 2 seconds. I tried setting my UILabel's text to "A text", and use …

ios objective-c swift wait performselector
Simple string concatenation in Objective C

I have an NSString named 'you' with value "This is a you string!". I want to concat "123" in 'you', how …

objective-c ios nsstring string-concatenation
Getting Current Time in string in Custom format in objective c

I want current time in following format in a string. dd-mm-yyyy HH:MM How?

iphone objective-c datetime nstimer
How to read data structure from .plist file into NSArray

I was creating a data structure manually using the following: NSDictionary* league1 = [[NSDictionary alloc] initWithObjectsAndKeys: @"Barclays Premier League", @"name", @"Premier …

ios objective-c iphone cocoa-touch plist
Sort NSArray of date strings or objects

I have an NSArray that contains date strings (i.e. NSString) like this: "Thu, 21 May 09 19:10:09 -0700" I need to sort …

objective-c cocoa sorting nsarray nsdate
Is there a way to suppress warnings in Xcode?

Is there a way to suppress warnings in Xcode? For example I am calling an undocumented method and since the …

objective-c xcode cocoa cocoa-touch suppress-warnings
How to write iOS app purely in C

I read here Learn C Before Objective-C? Usually I then replace some Obj-C code with pure C code (after all …

objective-c ios c cocoa-touch objective-c-runtime
How to create singleton class in objective C

How can I create a singleton class in Objective C?

iphone objective-c singleton