When you get on a plane, the crew members make sure everyone that checked in, is actually on the flight. If someone doesn’t board, then the plane either stays until they board or remove them and their luggages from the plane. It’s a safety check.
CocoaPods does something similar. But before we dive deep into what a Manifest.lock file is, we should learn about the two schools of thoughts when it comes to dependencies....
What is UITransitionView about?
I was using Xcode’s View Hierarchy and noticed this UITransitionView in my view hierarchy.
... UIWindow UITransitionView FooVC UITransitionView BarVC This was odd because I was expected a view hierarchy as such:
... UIWindow UITransitionView FooVC BarVC What made it more perplexing was that the canvas was showing things correct, but the View Hierarchy didn’t make sense.
To be clear on jargon, the following is the name of each section of Apple’s view debugger:...
Why can't Xcode show the caller?
Download the sample project if you want. You don’t have to though. The project doesn’t even need to be ran. It’s just provided for context.
I’m going to discuss two gotchas I hade with Xcode. For quite some time I thought a fix was coming, then I realized this is because I didn’t fully understand the difference between an interface (or protocol) with a concrete type.
Find Call Hierarchy not working: Have you ever right clicked on a function -> Find -> Find Call Hierarchy, but then wondered why Xcode doesn’t show you where the function is getting called from?...
Swift Protocol Compile Time Check
I always thought that if you just use {get} on a protocol variable, then you can still set it i.e. it doesn’t matter if you give it a setter or not. That’s not true. It really depends on which compiler checks come in to place. Compiler checks are different depending on the type you want a variable to be.
Can you guess which of the two snippets will compile?
Snippet A...