iOS Development is easy with XCode, Swift3, UITableView, cocatouch, let's build iPhone, iPad and Macbook Applications.

Call the official *Settings* app from my app on iPhone

At one point in my app, I would like to redirect the user to the official Settings app. If possible, I also want go straight to the Network section within the Settings app. I think what I need is the Settings app’s url scheme and the format to construct my request. But I doubt that […]

How is release handled for @synthesized retain properties?

I have some questions about synthesized properties in Objective-C. The full list follows, but the basic question is this: How does the compiler ensure that the ivars for synthesized properties are properly released, even though my code may or may not include release methods in dealloc? Note: I decided not to post these as individual […]

Variably modified array at file scope

I want to create a constant static array to be used throughout my Objective-C implementation file similar to something like this at the top level of my “.m” file: static const int NUM_TYPES = 4; static int types[NUM_TYPES] = { 1, 2, 3, 4 }; I plan on using NUM_TYPES later on in the file […]

Alternatives to dispatch_get_current_queue() for completion blocks in iOS 6?

I have a method that accepts a block and a completion block. The first block should run in the background, while the completion block should run in whatever queue the method was called. For the latter I always used dispatch_get_current_queue(), but it seems like it’s deprecated in iOS 6 or higher. What should I use […]

What is – good for?

In my question “How do I get -[NSString sizeWithFont:forWidth:lineBreakMode:] to work?”, I learned that -[NSString sizeWithFont:constrainedToSize:lineBreakMode:] was actually what I needed. The documentation for -[NSString sizeWithFont:forWidth:lineBreakMode:] states explains it doesn’t actually wrap the text to additional lines. So how would I use it? (Examples would help.)

How do I set bold and italic on UILabel of iPhone/iPad?

How do I set bold and italic on UILabel of iPhone/iPad? I searched the forum but nothing helped me. Could anyone help me?

How do I share an object between UIViewControllers on iPhone?

My application is a tab bar application, with a separate view controller for each tab. I have an object in my first view controller (A) which contains all my stored application data (Please ignore NSUserDefaults for this) which needs to be accessed by the second view controller (B) when I press a button on it. […]

The entitlements specified…profile. (0xE8008016). Error iOS 4.2

I am getting the ‘dreaded’ error The entitlements specified in your application’s Code Signing Entitlements file do not match those specified in your provisioning profile. (0xE8008016). when trying to deploy my first app to an un-jailbroken device on iOS 4.2.6 (Verizon). The thing is, I do not have a Entitlements file in my project, as […]

Convert Seconds Integer To HH:MM, iPhone

I am struggling with this. I have a value in seconds that I want to display in a label in HH:MM format. I have searched the internet for ages and found some answers, but either not fully understood them, or they seem like an odd way of doing what I want. If someone could help […]

Objective-C: @class Directive before @interface?

What is the difference between these two class declarations? I don’t understand why @class is utilized here. Thanks. @class TestClass; @interface TestClass: UIView { UIImage *image1; UIImage *image2; } and @interface TestClass: UIView { UIImage *image1; UIImage *image2; }