Question: **Please suggest me, how to open the SSL urls using selenium-rc?**

Answer: 
The Swift version of the accepted answer:

```
extension UIImageView {
var imageScale: CGSize {
    let sx = Double(self.frame.size.width / self.image!.size.width)
    let sy = Double(self.frame.size.height / self.image!.size.height)
    var s = 1.0
    switch (self.contentMode) {
    case .scaleAspectFit:
        s = fmin(sx, sy)
        return CGSize (width: s, height: s)

    case .scaleAspectFill:
        s = fmax(sx, sy)
        return CGSize(width:s, height:s)

    case .scaleToFill:
        return CGSize(width:sx, height:sy)

    default:
        return CGSize(width:s, height:s)
    }
  }
}

```
Just adding a little security on Individual11 code.
Calling imageScale on an imageView without an actual image would crash.

```
extension UIImageView {
    var imageScale: CGSize {

        if let image = self.image {
            let sx = Double(self.frame.size.width / image.size.width)
            let sy = Double(self.frame.size.height / image.size.height)
            var s = 1.0
            switch (self.contentMode) {
            case .scaleAspectFit:
                s = fmin(sx, sy)
                return CGSize (width: s, height: s)

            case .scaleAspectFill:
                s = fmax(sx, sy)
                return CGSize(width:s, height:s)

            case .scaleToFill:
                return CGSize(width:sx, height:sy)

            default:
                return CGSize(width:s, height:s)
            }
        }

        return CGSize.zero
    }
}

```