         installTextStub(self.installTextStubSwitch)
         installImageStub(self.installImageStubSwitch)
         OHHTTPStubs.onStubActivation { (request: NSURLRequest!, stub: OHHTTPStubsDescriptor!) in
-            println("[OHHTTPStubs] Request to \(request.URL!) has been stubbed with \(stub.name)")
+            print("[OHHTTPStubs] Request to \(request.URL!) has been stubbed with \(stub.name)")
         }
     }
 

        if sender.on {
            // Install
            
            let isImage = { (request: NSURLRequest!) -> Bool in
                contains(["png","jpg","jpeg","gif"], request.URL?.pathExtension ?? "")
            }
            // - we use a separate block 'isImage' for the 'test' predicate for code readability
            // - we use the "trailing closure" syntax of Swift for convenience
            // - we don't care about the 'request' parameter in the trailing closure so we use '_'
            imageStub = OHHTTPStubs.stubRequestsPassingTest(isImage) { _ in
                let stubPath = OHPathForFile("stub.jpg", self.dynamicType)
                return OHHTTPStubsResponse(
                    fileAtPath: stubPath!,

        self.installImageStubSwitch.enabled = sender.on
        
        let state = sender.on ? "and enabled" : "but disabled"
        print("Installed (\(state)) stubs: \(OHHTTPStubs.allStubs)")
    }
    

