INTRODUCTIONA while ago Facebook open-sourced Chisel, a collection of commands and functions to assist in debugging iOS apps in LLDB. For a collection of tips and tricks on using LLDB in general (including Chisel tips), read my objc.io article on debugging: "Dancing in the Debugger - A Waltz with LLDB" and if you have some time you should read the entire objc.io edition...
Stepping ForwardYou are in the middle of an interactive rebase in git and you want to go forward *one* commit: git rebase --edit-todoThen change the first line of the file to edit instead of pick then save and close the rebase-todo file. Finally run: git rebase --continueStepping BackwardNow imagine that you want to go back one commit, while...
Let's take a look at a rather unsuspecting method. - (void)setClass:(Class):class forKey:(NSString *)key;There isn't much special about it. Most likely it belongs to some object that plays some dictionary-like role, but that doesn't really matter. What does is that I would have a hard time sleeping at night if I wrote that.I'm a pedant....
The journey of a selector that is unrecognized.IntroductionThe atomic unit in Objective-C is an invocation, sending a selector to an object with some arguments. To invoke the selector doThings: on anObject we write the familiar line. [anObject doThings:things];Usually this calls into the method and all is well. But what happens when anObject doesn't...
Every message send in Objective-C is compiled into a call to objc_msgSend, a function that is called with the arguments as the message sense but with the receiver and the selector as the first two. So the line [receiver message:foo beforeDate:bar];will be compiled into to just call a C function: objc_msgSend(receiver, @selector(message:beforeDate:),...
Note: This entire discussion applies only to the 32-bit run-time. In the 64-bit run-time BOOL is actually _Bool and is a real type. :D It doesn't take very long with Objective-C to start using BOOLs. There are already many awesome discussions out there on their subtle, obnoxious behavior, with the following being two of the best:https://www.mikeash.com/pyblog/friday-qa-2012-12-14-objective-c-pitfalls.htmlhttp://blog.bignerdranch.com/564-bools-sharp-cornersThere...
Construisez votre propre fil d'actualité
Prêt à tenter le coup ?
Commencer un essai de 14 jours, aucune carte de crédit n'est requise.