Open Artmobile opened 11 years ago
This is quite surprising, I'm pretty sure addSubview effectively removes any link to the previous parent. Are you sure it's not a weird retain/release issue?
I can confirm this is true
Pretty sure it's not. We are using ARC On Jun 9, 2013 4:54 PM, "Nicolas Bouilleaud" notifications@github.com wrote:
This is quite surprising, I'm pretty sure addSubview effectively removes any link to the previous parent. Are you sure it's not a weird retain/release issue?
— Reply to this email directly or view it on GitHubhttps://github.com/n-b/UIView-NibLoading/issues/1#issuecomment-19166451 .
@specialunderwear I've reread your original message and I'm even more puzzled. When does the crash happen exactly?
If I understand correctly, the scenario is:
You see a crash at 2., is this it? Can you try to isolate the crash on a minimal test project?
Sorry, closed by mistake
I realize that addSubView should move the view from one parent to another. Still, it either did not happen or something else went on. @specialunderwear - are still experiencing the same problem?
Yes, I fixed it in my fork. Crashes everytime ...
On 21 sep. 2013, at 07:22, IA notifications@github.com wrote:
I realize that addSubView should move the view from one parent to another. Still, it either did not happen or something else went on. @specialunderwear - are still experiencing the same problem?
— Reply to this email directly or view it on GitHub.
I have the same issue (iOS 6 only) and the same fix works.
I just had to fix this issue myself and was about to send a pull request. Definitely confirmed in iOS6. Works fine in 7 and 8
I spent several hours trying to understand why a view that was created using your class crashed my application when I called removeFromSuperview on it. Turned out that you do not detach elements from the container when reparenting. To fix, just call [view removeFromSuperview ]; before reparenting.