skip to Main Content

Xcode – Unit test, to test if a view controller has presented another view controller

I want to make a unit test to see if a view controller is presenting another view controller. func testMainTabController_WhenActionButtonIsTapped_NewSuppliersInvoiceControllerIsCreatedV2() { let sut = MainTabBarController() sut.loadViewIfNeeded() let myExpectation = expectation(description: "The sut should present a view controller") sut.actionButton.sendActions(for: .touchUpInside) if…

VIEW QUESTION

Xcode – How do I hide Apple's delegate functions in my class from outside users of my class?

I have the following class: class Scanner: NSObject, AVCaptureVideoDataOutputSampleBufferDelegate {} It has a delegate method implemented in the class from AVCaptureVideoDataOutputSampleBufferDelegate: func captureOutput(_ output: AVCaptureOutput, didOutput sampleBuffer: CMSampleBuffer, from connection: AVCaptureConnection) {} Even when I set the function to private,…

VIEW QUESTION
Back To Top
Search