Can I create a class that subclasses from Array?
<p>I am fiddling around with making a cocoapod, and I am trying to make a class that sub-classes from type <code>Array</code>.</p>

<p>The reason I wan it to sub-class from <code>Array</code>, is because <code>Array</code> and <code>NSArray</code> are treated differently in Swift.</p>

<p>I can create a class like this:</p>

<pre><code>class Test : NSArray {}
</code></pre>

<p>But if I try this:</p>

<pre><code>class Test : Array {}
</code></pre>

<p>Or this:</p>

<pre><code>class Test : [AnyObject] {}
</code></pre>

<p>I get an error.</p>

<p>Mostly the reason I want this is so I can use functions like this:</p>

<pre><code>let i = myArray.randomObject()
</code></pre>

<p>Versus this:</p>

<pre><code>let i = Test.randomObject(myArray)
</code></pre>

<p>Any ideas of what I could do (instead maybe)?</p>