dimanche 10 mai 2015

Xamarin Ios screen reload issue

I have recently created a ios application using Xamarin. The aplication is writen is C#. The application is a little complex and big. It has a lot of dynamic menus. I have noticed a problem that I could not solve it. When I want to remove a sub view and add another subview sometimes, especially it the system is high loaded the first subviews is not removed but the second is add and they overlap.

I have tried a lot of things to remove the sub view from view:

sub.RemoveFromSuperview();

InvokeOnMainThread ( () => {
sub.RemoveFromSuperview();
}); 

or

view.WillRemoveSubView(sub);
sub.RemoveFromSuperview();

but still sometimes work and sometimes it does not work. Is there any problem, with my approach or there is some problems with IOS. Is there any way to fix this. This problem appears in iPhone and iPad too.

Thanks in advance

Aucun commentaire:

Enregistrer un commentaire