Question: When defining an IBAction, there's an option for Anyobject and UIButton, both works, what's the difference?

Answer: 
If you are only ever going to use the function with a `UIButton` it is best practice to declare your sender as a `UIButton`. This saves you a bit of code and it also tells anyone in the future reading your code that you only expect the function to be used with a `UIButton`. 

Using `AnyObject` or `Any` will work, but you will need to do an `guard let button = sender as? UIButton { return }` in order to access it as a button. This way allows you to react differently depending on what the sender actually is, but I don't recommend doing that.
If it's anyObject, then it doesn't have any of UIButton's properties. When you click the button and the IBAction fires, sender contains information about the thing that triggered the action. 

For example, for a UIButton, you might want to query the UIButton's text when the IBAction triggers. 

However, in a situation where the IBAction is connected to two different UI controls, let's say, a button and a slider, querying the sender when it's of type UIButton (while the triggering UI element is the UISlider) will crash the program. If you have AnyObject, you'll be able to test if the sender is a UIButton or a UISlider, and then do something. 

In general, if you don't care about sender, leave it blank, so people reading your code will know that you aren't using sender for anything.