A while ago I wrote on my blog about a solution to one of the most common questions asked by Objective-C programmers which is “How can I create string enumerations?”. Well, the solution that I’ve given has immediately become one of the top subjects that attracts developers to my blog, as I can see in my stats. I thought I should now take it to a whole other level and get rid of the limitations that I had presented in the old solution, and come up with a fresh perspective.
The following video is the result of my work on this subject. I hope you’ll enjoy watching it.
Hello internet. After writing many many books and developing iOS apps for 6+ years, I feel I am now ready to take on a new challenge. To start teaching iOS development to people who are interested in transforming or perfecting their career.
I am available for teaching iOS development to you ANYWHERE in the world you are in. If you are in London or in Brighton in the UK, we can have face to face lessons. If anywhere else in the world, I can teach you over Skype.
Classes will be tailor made to suite your free times, abilities, etc. If you are interested, get in touch by sending me an email at: firstname.lastname@example.org
In this video, I’ll demonstrate to you some of the baiscs of LLDB using the “expr” command to speed up your day to day development.
As you know, my recent book is now published, titled “iOS 7 Programming Cookbook”. You can purchase it here:
All the source codes written for this book are now available on Github at the following location:
If you have any questions, please let me know.
So you have written an Objective-C class and you would like to mark it as unavailable so that others won’t be able to instantiate it?
The solution is simple. In the header file of your class, place the following code:
__attribute__((unavailable("Your message to the developer goes here")))
So here is an example of a class header file that uses this LLVM extension:
__attribute__((unavailable(“This class is unavailable. Please use the YourClass class instead”)))
@interface MyClass : NSObject
Once a programmer attempts to use this class, they will see something similar to this in Xcode (Click to Enlarge the photo):
Click to Enlarge