Duc Ninja

I'm an iOS engineer and a ninja as well.


We usually use the class keyword to define a class only protocol in the normal way.

protocol DetailViewControllerDelegate: class {
func didFinishTask(sender: DetailViewController)
Read more »

You are using third-party tools like CocoaPods, Cathage, SPM or just having some useful script files for your project. It’s fine!

Read more »

For the longest time I just used “po” in lldb to examine objects but “e” just adds a whole new level to debugging !

Read more »

⌃⌥⌘U shortcut does different things depending on the current cursor location:

  • inside a test method: runs this single test method
  • inside an XCTestCase subclass but outside of any method: runs all tests in the class
  • Run last test case before: ⌃⌥⌘G
    Read more »

Passing data from one view controller to another view controller using Notification Center is an easy way when compared to delegate protocols.

Here we need add observer or listeners for getting new data to load. First we need to send data using post notification method.

Read more »