Friday, May 15, 2020

Create Button Auth Facebook FBLoginButton Full Width


In my app Dog Master, I have authentication to log in from two platform that are Google and Facebook. Basically I used the login button that is created by Google Firebase and Facebook. These two button are in different width. As you know the google button sign in is easy to be designed in storyboard. But Facebook it's fixed width if we want to make it full width in each edge of screen, it would make space padding.

In this post, I don't talk about how to auth with facebook. But for additional information I used authentication with Firebase auth. It's easy to use if you follow the tutorial given by Firebase documentation. If you have any issue about it maybe I can help you. Just comment below this post.

As you can see above screenshoot image, the facebook login button is basically only the facebook icon and "Continue with Facebook" text. Without blue background behind it. I customized it using UIView and I added tap handler to click FBLoginButton. I created this button on UITableViewCell, so it's basically same with UIViewController. 

Saturday, May 9, 2020

Review Skeleton View for iOS Swift 5


Happy day guys, I hope you are happy and calm. In this tutorial, I'm gonna talk and show to you how Skeleton View works. Many apps nowdays are using it. It's like a common way to load something that's not finished yet. You can use it for loading text or image. And I think it's very good UX. Not jut bored loading spinner by default.

You can use Sekeleton View for UIImageView or UILabel. That's what I used for my app and I will show you later. Before I used Toast-Swift to handle loading. The code is pretty simple though but I still used it for loading stuff. I usually calls this code "self.view.makeToastActivity(.center)" to show loading spinner on center of screen. And After load API finished I hide the loading spinner using self.view.hideToastActivity(). Just like this.

And If you use UITableView, you need to implement SkeletonTableViewDataSource to give Skeleton an idea how to react spesific UITableViewCell through cell identifier. And If you don't it implement it, it's not working I have tried and that's confusing me a little while.