In the above snippet, you can see, <T> is the additions, right next to class name, that makes it a generic type. You can make use Type T within the implementation just like any other type.
You can check the sample project here in Github.
Thursday, July 10, 2014
Posted by
Adithya
at
1:47 AM
|
Labels:
Apple,
Generic Type in Swift,
Generics,
iOS,
Stack Implementation,
Swift,
SwiftLanguage
|
0
comments
|
Email This
BlogThis!
Share to X
Share to Facebook
|
Sunday, June 29, 2014
Posted by
Adithya
at
11:35 PM
|
Labels:
Apple,
Class,
iOS,
Properties,
Swift-Language
|
0
comments
|
Email This
BlogThis!
Share to X
Share to Facebook
|
Monday, June 23, 2014
Posted by
Adithya
at
2:07 AM
|
Labels:
Apple,
iOS,
OperatorOverride,
Swift-Language,
SwiftLanguage
|
0
comments
|
Email This
BlogThis!
Share to X
Share to Facebook
|
Saturday, June 7, 2014
Posted by
Adithya
at
8:58 AM
|
Labels:
Apple,
iOS,
Objective-C,
Swift-Language,
SwiftLanguage,
WWDC14
|
0
comments
|
Email This
BlogThis!
Share to X
Share to Facebook
|
© Swift Blog - Designed by Nudge, Blogger templates by Blog and Web.