I will show with an example: I have two UIViewControllers, one is to present and the other one is to be presented. They both have UITapGestureRecognizer on their views. When tapped, the presenting one presesents and the presented one dismisses. And the transition is not custom yet. To make it custom, first we need an…
Month: November 2020
Preventing the Retain Cycle Memory Leak Of Strong Swift Arrays
Let’s create a retain cycle memory leak with arrays: Subscriber holds publisher strong and publisher holds its subscribers back in its subscribers array. Paste the code into your playground and observe that deinit never gets called, too bad! The array itself can not be a weak reference. But its elements can be defined as weak…
Testing iOS SSL Pinning With Charles
So you have finished implementing SSL Pinning with your favorite tool (URLSession, AlamoFire, AFNetworking, etc…) and you want to test it. I would suggest using Charles on doing that. As in “https://www.charlesproxy.com” stated, “Charles is an HTTP proxy / HTTP monitor / Reverse Proxy that enables a developer to view all of the HTTP and…
