# Differences between init() methods

**URL:** <https://forums.kodeco.com/t/differences-between-init-methods/21770>\
**Category:** Swift\
**Created:** [October 27, 2016, 5:37am UTC](https://forums.kodeco.com/t/differences-between-init-methods/21770 "2016-10-27T05:37:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vimipatel](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/vimipatel/32/83106_2.png) [@vimipatel](https://forums.kodeco.com/u/vimipatel)\
**Post date:** [October 27, 2016, 5:37am UTC](https://forums.kodeco.com/t/differences-between-init-methods/21770/1 "2016-10-27T05:37:44Z")

</div>

What are the differences between :

```
convenience init()

required init()

override init()

init()

```

I am getting error, where I have two init methods. `convenience init()` and `init()`

Error is : **‘self’ used before super.init call**

I have write `super.init()`, then also no luck. Please let me know about above methods.

---

<div class="post-metadata">

**Author:** ![sonoblaise](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@sonoblaise](https://forums.kodeco.com/u/sonoblaise)\
**Post date:** [October 27, 2016, 9:39pm UTC](https://forums.kodeco.com/t/differences-between-init-methods/21770/2 "2016-10-27T21:39:02Z")

</div>

I’m kinda new to Swift, but from what I understand, the convenience init() is used to provide alternate constructors to your class, so you get different ways of creating your instances. Your convenience declaration has to be different from any other init() you might already have.

For example, a CGPoint can be instanciated with no params, ‘x’ and ‘y’ as CGFloats, as doubles, ints, etc. Behind the scenes, I’m pretty sure they do the exact same thing, but the different param types let you create a CGPoint without having to typecast.

hope it helps a little!

---

<div class="post-metadata">

**Author:** ![vimipatel](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/vimipatel/32/83106_2.png) [@vimipatel](https://forums.kodeco.com/u/vimipatel)\
**Post date:** [October 28, 2016, 8:56am UTC](https://forums.kodeco.com/t/differences-between-init-methods/21770/3 "2016-10-28T08:56:11Z")

</div>

Thanks for your time.

---

<div class="post-metadata">

**Author:** ![doyle](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/doyle/32/102075_2.png) [@doyle](https://forums.kodeco.com/u/doyle)\
**Post date:** [October 28, 2016, 11:25am UTC](https://forums.kodeco.com/t/differences-between-init-methods/21770/4 "2016-10-28T11:25:08Z")

</div>

Tutorial available on this topic [https://www.raywenderlich.com/119922/swift-tutorial-initialization-part-1](https://www.raywenderlich.com/119922/swift-tutorial-initialization-part-1)
