Skip to content

spacedrabbit/CatPalettes

Repository files navigation

CatPalettes


...animation. it looks less broken than the attempt at reloading following the animation block. Further, the table refresh should be obvious following the cell animation since both are executing on the main queue and thus in serial. But now that I think about it, the examples in my mind of apps that have this feature (the tap to expand) all do so in an instataneous manner.

...theme, adds geobackground image, credits added to README. It was at this point I decided to refocus on the actual MVP instead of the nice animations I'd envisioned the app to have. So i removed a bunch of code related to the show/hiding of the floating '+' icon at the bottom of the palettes view controller.

8/24

..., adds comments. As suspected, the type check I was doing wasn't properly determining the value of the nav controller's top VC. I had to modify it so that there was a run time check on the classes via their .dynamicType. Following this, the checks worked properly and I was no longer pushing the same VC onto the navigation stack when returning from the menu. Though, a fortunate side effect of this issue was discovering a (non-block based!) cyclical retain cycle in the pod I was using...

... I noticed that the app's memory footprint increased by ~1MiB each time I pushed the VC containing a color picker view (from SwiftHSVColorPicker). I thought it was odd that Instruments wasn't detecting a leak or retain cycle, considering how perfectly reproducible the issue was. The best I could gather was that each generation I was marking in Instruments was detecting a new ~1MiB allocation from a call to CFData

After looking at the pod, the problem quickly became apparent. It appears that the pod makes an attempt to use a delegate-protocl pattern for informing when a user has selected a new color on the color wheel. However, no actual protocol is defined. Rather, the ColorWheel class has an instance variable var delegate: SwiftHSVColorPicker, and the SwiftHSVColorPicker class in turn has a strong reference back to its ColorWheel.

There is no issue currently tracking this problem, so I have planned to submit a proposed fix shortly for the pod. However, I have already patched the issue in my own project.


Credits:

About

A terrible, terrible, terrible attempt at sound and fury. signifying nothing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published