Flexible table views with descriptor arrays

Introduction

Frequently, in our work as iOS developers, we have to present some kind of data in a table view or in a collection view. There are many ways to customise the standard Apple components by implementing the their datasource and delegate methods. Most of the time, our task comes down to implementing the required methods for how many rows the table/collection view has and how should each row in that view look like. As a datasource, we usually have an array of model objects. The length of that array determines the first requirement (number of rows) and the data in each entry determines what will be presented in each row.

However, sometimes we have to implement more advanced table views, where some combination of cells might be hidden in one state and displayed in others. In this post, we will see how we can implement this in a more elegant manner, with a very simple, but powerful trick.

Continue reading “Flexible table views with descriptor arrays”

Advertisements

Forward pipe operator in Swift

One of the most debatable Swift features is the possibility to create your own (or overload the existing) operators. This feature has both pros and cons – on one hand you can make your code more readable, by getting rid of some verbose stuff. However, on the other hand, you might not implement the operator properly and make a complete mess. Also, others looking at your code might be confused about this new unknown operator. So, creating operators in Swift should be done with caution and only when needed.

One operator that I find really useful in projects is the Forward Pipe operator. First defined in F#, this operator helps us avoid multiple nested function calls. Let’s see how we can do this and see some examples.

Continue reading “Forward pipe operator in Swift”

iOSCon 2018

Conferences are a great opportunity to exchange knowledge and experiences with the fellow developers. The iOS community is pretty cool – there are a lot of fantastic people who are building apps and tools, but also share knowledge with everyone who wants to work as an iOS engineer.

I’m very excited to attend iOSCon 2018, where I will be speaking about Understanding language on iOS. In the talk, we will see approaches that can help us in tackling one of the most challenging tasks in computer science – understanding what the users are trying to say. The talk will cover technologies ranging from SiriKit, Dialogflow, Wit.ai and CoreML, up to doing it everything by yourself, using Apple’s NSLinguisticTagger. If these technologies are interesting for you and want to learn more about them, come and see my talk on 23rd March @ CodeNode in London. For even more details, you can also check my new book Developing Conversational Interfaces for iOS, published by Apress.

Continue reading “iOSCon 2018”

Common iOS development mistakes

Introduction

Developing iOS apps is fun and challenging. During this process, we sometimes make bad decisions and mistakes, that can have impact on the quality of the app (both technical and from the user’s perspective). Some of those pitfalls can cause crashes in our apps, making users angry. Others can make the maintenance of the app a nightmare, making developers angry. In this post, we will see some of the more common such errors, ranging from the most trivial ones that a careless developer can make, to the bigger impact ones, that a tech lead might not foresee and send the project to hell.

Continue reading “Common iOS development mistakes”

My book is published!

I’m very excited to announce that my book Developing Conversational Interfaces for iOS is officially published by Apress, one of the world’s leading IT books publishers. You can order the book here. I hope you will like it and I’m looking forward to your feedback. You can read about my experience writing the book here. You can find some pictures below.

Continue reading “My book is published!”

Xcode build settings tour

Introduction

Build settings in Xcode define how your app is going to be built. Usually, when your app shows build errors or it fails to validate on iTunesConnect, build settings is the place that you should search for errors. Is some path configured in a wrong way? Are the architectures properly set? What about the linker flags? In this post, we will look at several build settings (not all since there are too many), and what errors they might cause. Here’s a list of all the settings for reference.

Continue reading “Xcode build settings tour”

Writing a technical book

Recently, I’ve finished writing a technical book, called Developing Conversational Interfaces for iOS, which will be published by Apress early next year. Writing a book is a very different experience than writing code or blogging. That’s why in this post I will share my impressions from that interesting journey. I hope other developers who want to try themselves out in the book publishing industry will consider my findings helpful.

Continue reading “Writing a technical book”