Guidelines #1 for Developers

Here are some rules or guidelines I try to live by as a developer. They are for all of you, from the beginners to the seasoned developers. It is not an exhaustive list, so feel free to add yours in the comments below! 1. “Temporary” doesn’t exist in development Be honest with yourself, you’re never going to change it. Ever. 2. Use meaningful variable names Because abc, test or tmp are not really understandable by other developers, or by you in 6 months. 3. Be consistent with style, use guidelines Some are immune to it, but unfortunately (or not), it … Continue reading Guidelines #1 for Developers

UICollectionView Custom Layout: the Ultimate Tutorial – Part 2

Welcome back to the “UICollectionView Custom Layouts: the Ultimate Tutorial” series. This is Part 2, where we will actually tackle the custom layout part. If you haven’t seen or done the first part, I strongly recommend you to take a look at it, as we will be using the UICollectionView we created there. Remember what we had at the end of Part 1, when we run the project without the custom layout, and what we would like to achieve?       A few words A few words before we start: I recommend you to have a look at Session 232 of … Continue reading UICollectionView Custom Layout: the Ultimate Tutorial – Part 2

UICollectionView Custom Layout: the Ultimate Tutorial – Part 1

I’m working every day with UICollectionViews and until recently never used a custom layout. I decided to take the plunge and learn how to create one when I had to deal with a complex layout on a UICollectionView and make my designer happy. So here is everything I learned (or everything you need to know — to start with) about custom layouts for UICollectionView. Let’s imagine that you have a “complex” design to integrate in a UICollectionView. And yes, you need a collectionView. When I say complex, I mean different types of cells, some of them will have a fixed … Continue reading UICollectionView Custom Layout: the Ultimate Tutorial – Part 1

How to create a Section Background in a UICollectionView in Swift

I recently faced a small challenge on a UICollectionView, the following screenshot illustrates pretty well the situation. In short: I needed to have a transparent background in a UICollectionView to be able to see through some sections, but I didn’t want to be able to see the background in between the cells on some others. Basically, I needed to be able to set different background colors per section. Well, needless to say that functionality doesn’t exist by default on iOS. Luckily for me I found this great article: Changing the section background color in a UICollectionView from Eric Chapman who … Continue reading How to create a Section Background in a UICollectionView in Swift

Be an ecofriendly geek and save the planet: delete your e-mails!

You want to save the planet? Good! Start by cleaning your inbox! Let’s delete some e-mails, shall we? We consume a lot of data every day (e-mails, videos, posts on Facebook, Instagram, Twitter, WhatsApp, DropBox, documents saved in the Cloud, …), and all those data are stored on servers. Basically, the more data we save, the more servers we need (and servers consume electricity). Basic math, nothing new under the sun. What if I told you that we can all do a little bit of good for this planet, just by clicking on one button? Remember those prehistoric e-mails that … Continue reading Be an ecofriendly geek and save the planet: delete your e-mails!