In Java we can use constructors in order to pass initial values into a class. Is this possible in swift?
I do not want to have to initialize the class as the values going into it vary (sometimes a video and sometimes a image)
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'