LinkedInAttic / LayoutKit

LayoutKit is a fast view layout library for iOS, macOS, and tvOS.
http://layoutkit.org
Apache License 2.0
3.16k stars 267 forks source link

Add `isLayoutKitView` for safe view removal #85

Closed inamiy closed 7 years ago

inamiy commented 7 years ago

It seems composite view's subviews e.g. UIButton's subviews (UIImageView and UIButtonLabel) gets removed and displays nothing when:

1.makeViews is called twice

  1. ButtonLayout has viewReuseId (UIButton will be reused)

This is because purgeViews is removing views even though some of them are not managed by LayoutKit, so I added isLayoutKitView for safe view removal.

codecov-io commented 7 years ago

Current coverage is 92.75% (diff: 91.11%)

Merging #85 into master will increase coverage by 0.03%

@@             master        #85   diff @@
==========================================
  Files            52         52          
  Lines          2982       3024    +42   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits           2765       2805    +40   
- Misses          217        219     +2   
  Partials          0          0          

Powered by Codecov. Last update 13884f3...8ad0a99

nicksnyder commented 7 years ago

Thanks for submitting, I should have a chance to look at this in a day or two.