Laziness is a beautiful thing. Thanks to the non-existent motivation to do repetitive, boring and tedious tasks, we as a population grow and develop alternative ways to accomplish the same things, but in a new, more time efficient and productive manner. One such task is working with Core Image.
As many of you probably know by now, iPhone 6 Plus has a higher pixel density and now required @3x imagery to provide a crisp UI experience. I am big fan of dynamically drawing UI elements, button background, segment dividers, and many other elements in code. Let’s take a look at how we can make that happen.
Not long ago, when Swift was still in its infancy beta stages, I decided to run the two languages through some test side-by-side and see how they compared against one another when it came to speed of execution. You can find the article here. Time has come and Swift is officially released along with iOS 8 and its time to revisit the performance comparison.
An application that I’m currently working requires making the drop to the CoreFoundation level so out of curiosity I decided to contrast and compare the performance difference associated with using the Foundation-level
NSArray object versus its CoreFoundation counterpart –
CFArray. To be more precise, in this test we are exploring the performance difference of iterating over the mutable version of both objects, inserting a string, getting the array count (to replicate a real-world scenario where the array size is not given) and retrieving the element at index. This is a brutally simple test, but will hopefully provide at least some insight into how fast each method really is in comparison.
I use these objective-c macros in every single project I work on and I highly recommend you use them too. These macros are designed to simplify your code, make it easier to read and maintain. Include them in your
ProjectName-Prefix.pch file to make the complete set available to the entire project.
Working with NSDates and calendrical calculations can sometimes be a pain. Adding days, subtracting months, and adjusting today’s date to midnight. Today’s we’ll take a look at several way to simplify the process and abstract the logic away into some neat category methods.
Probably one of the most useful methods to have in a category on an
NSArray is this method. It allows you easily and safely grab the first element of the array. This makes for a great counterpart to the already existing method