Question: I am using tableview to list my products. In "cellForRowAtIndexPath", with the help of "dequeueReusableCellWithIdentifier", we can access property of UITableViewCell. For Example,

```
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {

var cell1 = product_tableview.dequeueReusableCellWithIdentifier("productmain", forIndexPath: indexPath) as product_tblCell

cell1.label1.text = "PRODUCT 1"
return cell1
}

```

but, if we want to use outside of this scope, within this viewController itself, how can we access that UITableViewCell property?

If I create like this any of UIButton action in this viewController,

```
var prop_cell = product_tableview.dequeueReusableCellWithIdentifier("productmain") as product_tblCell 

prod_cell.label1.text = "PRODUCT 5"
//NO ERROR SHOWN. BUT FATAL ERROR IN DEBUG AREA.
//UNABLE TO RUN

```

I am getting fatal error.
This is my major doubt in UITableView. Kindly response this. Don't simply De-Vote. Kindly guide me.

Answer: 
UIImage -> NSData

```
NSData *imageData = UIImagePNGRepresentation(image); or  UIImageJpegRepresentation(image)

```

NSData -> UIImage

```
UIImage *image=[UIImage imageWithData:data];

```
this question is already answered by stack-overflow refer this 

[How to store an image in core data](https://stackoverflow.com/questions/16685812/how-to-store-an-image-in-core-data)