Sometimes when you integrate a design, you need things to be square, everything aligned: buttons, title, images, textView… But wait, what’s that extra padding on the UITextView? You may have tried to print the contentOffset or contentInset without success. That’s not it. However, all your problems can be solved in one line, and here it is: // magic line for a UITextView named textView textView.textContainer.lineFragmentPadding = 0 I wouldn’t call it exactly straight forward, so this is a memo for me and tip for you :)
Tag Archives: Swift
Get your Facebook login ready for iOS9 with SFSafariViewController
Here we are again, back on SFSafariViewController with the Facebook login integration this time! Facebook is getting ready for iOS 9 and got its SDK updated with very few changes on our side, yay! It is still in beta version as we speak but it’s working like a charm. Let’s see how to implement our Facebook login with SFSafariViewController in 3 easy steps. First, make sure you use the right SDK (the beta one): Then, follow the Facebook instructions.You probably have all that already set up minus the iOS 9 migration. It should be an easy step. Getting started Preparing … Continue reading Get your Facebook login ready for iOS9 with SFSafariViewController
A Swift guide for iOS beginners
A couple of years ago I was a full stack web developer, from database to front-end. Then I had the opportunity to switch to mobile. Thanks to my mentor who pointed me to the best resources ever (Stanford University lectures), I could learn everything I needed pretty quickly and efficiently. It is now my turn to share with you what I believe are good references for beginners. Unfortunately, learning a new language alongside with a new development environment and a different way of thinking doesn’t come overnight. Forget about the Matrix style, uploading iOS Kung-fu lessons right to your brain … Continue reading A Swift guide for iOS beginners