In this video tutorial we’ll look at how to use Generics in a Swift function. A generic function or method works on collections of different types. Or to put it another way, a function could accept different parameter types when called. In this lesson we’ll use two simple types, String and Int. Like many of our previous Swift tutorial video podcasts, we’ll work in an iOS Playground file, but this same code works fine in any Swift based project: Mac, tvOS, iOS.
This video is from CartoonSmart’s Video Tutorial Podcast, so keep in mind, this is as much for fun as it is for education. But you’ll probably learn way more than you thought!
Subscribe to our Podcast through iTunes RSS feed / Full Show Archive0 Comments
Leave a reply
You must be logged in to post a comment.