I have an array of images to be submitted.

```
var images = [NSData]()

```

I need before I submit these images to check their total size; because of the server limitation.

I've tried following code but it's not giving me the actual size.

```
if (images.description.lengthOfBytesUsingEncoding(NSUTF32StringEncoding) >= 3900000)
{
    print("Max of images size reached")
} else {
    // Continue
}

```