-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Must remove from container's subviews when reparenting #1
Comments
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
|
@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 [email protected] wrote:
|
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.
The text was updated successfully, but these errors were encountered: