How do I create delegates in Objective-C?

An Objective-C delegate is an object that has been assigned to the delegate property another object. To create one, you define a class that implements the delegate methods you’re interested in, and mark that class as implementing the delegate protocol. For example, suppose you have a UIWebView. If you’d like to implement its delegate’s webViewDidStartLoad: …

Read more

Sort JavaScript object by key

The other answers to this question are outdated, never matched implementation reality, and have officially become incorrect now that the ES6 / ES2015 spec has been published. See the section on property iteration order in Exploring ES6 by Axel Rauschmayer: All methods that iterate over property keys do so in the same order: First all …

Read more