开发者

TabBar items disappear

In my application I use a TabBar with several items on it. After some time of using the application randomly happens 开发者_如何学Gothat the items disappear. I use scrollView that is hosted in a main fraim and this view opens several modal dialogs - one of them is fullscreen. I cannot see the reason why the TabBar items disappear. Any ideas?


Storing them in a "local" field won't help. You need to store them in a member variable of your class. There needs to be a reference to your tab bar items somewhere that exists the lifetime of your application to prevent the GC from collecting them.

The reason you wouldn't have to worry about this in WinForms, is you would call Controls.Add() (or WPF Children.Add()) which adds controls to a C# list internally. MonoTouch directly calls Objective-C for most things, which isn't GC aware.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜