Showing posts from February, 2020

Learning About Initialization Properties in iOS Swift 5

Hello guys, lately I have watched a good video to learn about iOS programming. It's CS 193P from standford university on youtube. Although I have learned iOS programming more than 4 years. I'm amazed about things that are learned. Many things I haven't noticed about deep language in swift. I'm so glad that swift is so powerful language. Thanks to the ones who created it. I haven't finished all tutorial videos. But soon day after day I will watch it. Never stop learning when we're in technology haha. Today I'm gonna share something simple that I haven't used in my project. But I think on the future, I will try to use it. So I will call it "Initialization Properties". You can create "set get property" with closure in swift. It's so easy to do it like example below. And you can do willSet and didSet property condition in method. It's very useful for me when I'm usually put initialization in viewDidLoad. I haven&

Add Padding Bottom in RecyclerView Android

Hello guys, on this week I want to share something special but I think it's useful for us. It's understable from the title of this post. But I will explain a little bit why I used padding bottom for my RecyclerView in Android. I have something called floating button to add my item in RecyclerView. It will be bad If I scroll to bottom and my floating button above item RecyclerView. I can't see clearly what text item in RecyclerView. You can see from picture above, I've marked a rectangle in picture above. Imagine if there's no padding bottom. It will truncate my RecyclerView items and it will make my app looks when in interface. So I think I need to have padding bottom in RecyclerView. But How do I do that ? Is it hard to implement ? Or Is it just a few code lines. I want to make "adding button" always be bottom right on my view and I don't want it to stack above RecyclerView. So the easy solution is to add padding. I changed my xml file layout a

Create Smooth Dropdown on iOS swift 5

Welcome back to my blog guys, today I want to share something about dropdown thing. Dropdown is not something that is exist on iOS UIKit. On iOS we have something similiar to dropdown menu Android that is Picker View. But sometimes we need to create UI same as Android. It will have better User Expierence. Fortunetely some people have dealt with our problems. So they created the dropdown menu in their own. What I have used is what I'm gonna share today. It's DropDown created by jriosdev, I will share github link on below, don't worry about it. You install dropdown in your project using CocoaPods, or You just simply add Dropdown library by creating class named DropDown and add Textfield in your Storyboard then change class Textfield to Dropdown. For more details how to install this library you can check their github. I will give the link github below OK.

Fixing Problem UIActivityViewController Share Photo Function Not Working Sometimes

Hello guys, today I got a problem when no errors or warnings message in my IDE (Xcode). It's so confusing for programmer when error happens for no reason. It's like magic we don't know how it happens lol. When sharing, I use iOS class library UIActivityViewController. It's a feature from iOS when we want to share something on other platforms. Like above image when we want to share something using UIActivityViewController, it will appear popup view dialog like above. You can choose what platform you will want to share. Basically, UIActivityViewController can provide text and image together. But on some app like Whatsapp, it only applies image or text not both. I have shared the trick to avoid always sharing text when we want to share image.