In Java we can use constructors in order to pass initial values into a class. Is this possible in swift?
For example, in the line below I am trying to add an object, which should include all the values you can see in the function that is within it, into an array called arrayOfMedia.
self.arrayOfMedia.append(Media().getUsersMedia(image: image!, postNum: anyPosts.key, userID: user))
I cannot do this however and get the error below.
Cannot convert value of type '()' to expected argument type 'Media'