Basic debugging in Xcode

Printing object description Probably the most used command when debugging apps is po. It evaluates the expression and prints out the object description. When printing custom objects, it should be noted that the format of the result can be customised by implementing debugDescription in CustomDebugStringConvertible protocol. Modifying code in runtime LLDB's expression command allows executing code when …

Circle shaped collection view layout on iOS

UICollectionViewLayout's responsibility is to define layout: all the cell locations and sizes. It acts like a data source object which provides layout related information to the collection view. Collection view then uses that information for creating cells and placing them on screen. This time we'll take a look on how to create a custom circle …

Particle emitters for apps with CAEmitterLayer on iOS

Particle emitters are encountered the most often in games. Apple's SpriteKit framework contains SKEmitterNode for this exact purpose. Moreover, Xcode even has a live editor for configuring SKEmitterNode. As SKEmitterNode can only be added to SKScene, it is not a good fit for apps. But no worries, apps can take advantage of CAEmitterLayer which is …