Question: Hey guys im new to xcode and programming

im trying out this tutorial on making a slide out menu

<https://www.youtube.com/watch?v=8EFfPT3UeWs>

I cant get it working i downloaded the finished project files found here:
<https://www.dropbox.com/s/7eku9pp06u75q6u/SlideoutMenuSwift-Full.zip?dl=0>

I cant get it to work

```
var cell = tableView.dequeueReusableCellWithIdentifier(TableArray[indexPath.row], forIndexPath: indexPath) as UITableViewCell

```

coming up with error 

anyobject is not convertible to `UITableViewCell` did you mean to use "as!" to force downcast?

any help would be greatly appreciated

Im 100% it has something to do with my version of xcode so hopefully something simple

cheers

travis

Answer: 
Welcome to the magic world of programming :-)

As bjornorri writes, the syntax for `as` was changed in Swift 1.2. 

If you look at the documentation for the method `dequeueReusableCellWithIdentifier` (which can be found [here](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UITableView_Class/index.html#//apple_ref/occ/instm/UITableView/dequeueReusableCellWithIdentifier:forIndexPath:)) you'll see that it returns `AnyObject` meaning anything really.

So...you have to cast it to a `UITableViewCell` which you do with the `as`keyword as you have already figured out. 

When you cast from something more abstract to something more specific, as you do here when you try to go from `AnyObject` to `UITableViewCell`, this is known as a downcast.

The problem with a downcast is, that you cannot be sure if it'll actually work. Sure, you say that you want this object to be a `UITableViewCell` (and in this case, it will work) but there's no guarantee, maybe the original value was something else than a `UITableViewCell`. 

Therefore, as of Swift 1.2, the behaviour of `as` was changed so you have to add a ! to force the downcast. This means that you tell the compiler to go ahead and just downcast the object, you know what you're doing. If it works then all is well, but if it doesn't, your app will crash. 

You can read more about it here at [Ray Wenderlich](http://www.raywenderlich.com/95181/whats-new-in-swift-1-2) (which I suggest that you bookmark if you haven't already :-))
This is because the Swift syntax has changed since the demo was written. You can probably fix this simply by following the suggestions in the error messages Xcode provides you.