1
import UIKit

class Service: NSObject {       
        let urlValue:NSURL = NSURL(string: "www.google.com")!
        let request:NSURLRequest = NSURLRequest(URL:urlValue)
}

I am getting the error "Service.Type does not have member named urlValue".

But,

let request:NSURLRequest = NSURLRequest(URL:NSURL(string: "www.google.com")!)

Works fine!. I am confused, where I went wrong? Any help will be greatly appreciated. Thanks!.

isarathg
  • 858
  • 1
  • 19
  • 37
  • 2
    possible duplicate of [Type does not have a member](http://stackoverflow.com/questions/25582853/type-does-not-have-a-member) – Martin R Nov 05 '14 at 12:52
  • Also possible duplicate of [Change the X and Y in a CGRectMake](http://stackoverflow.com/questions/25854300/change-the-x-and-y-in-a-cgrectmake) (with a different solution). – Martin R Nov 05 '14 at 12:54

0 Answers0