it looks like you are doing way too much work each time a tab is switched. eg
tb_tabbarreglogin.ItemSelected += delegate(object sender,
UITabBarItemEventArgs e)
{
switch (e.Item.Title.ToString())
{
...
you dont need to do this. with the tabbar, you pass it an array of tab
controllers, and if you need to update the selected view as it's
selected, you can use the ViewControllerSelected event, eg:
tabControllers = new UINavigationController[] {
new UINavigationController(home) {
TabBarItem = new UITabBarItem("Home",
StockImages.Home, 0)
},
new UINavigationController(projects) {
TabBarItem = new
UITabBarItem("Projects", StockImages.Project, 2)
},
new UINavigationController(contacts) {
TabBarItem = new
UITabBarItem("Contacts", StockImages.Users, 4)
},
new UINavigationController(mileage) {
TabBarItem = new
UITabBarItem("Vehicles", StockImages.GasPump, 5)
},
new UINavigationController(info) {
TabBarItem = new UITabBarItem("Info",
StockImages.Info, 6)
}
};
tabBar.SetViewControllers(tabControllers, false);
tabBar.ViewControllerSelected += delegate(object sender,
UITabBarSelectionEventArgs e) {
if (e.ViewController.TabBarItem.Title == "Home")
{
home.RefreshFromDatastore();
home.NavigationController.PopToViewController(home.NavigationController.ViewControllers[0],
false);
}
};
each one of home, mileage etc are just UIViewController derivates -
I'm using MonoTouch.Dialog, but they are just UITableViewController
(which inherited from UIViewController) under that.
I suggest you split the code into separate classes (not one big one) -
one for Impressum, one for Registration etc. and then just do the
minimum of "setup" when the user switches to the tab (if any at all -
I prefer to keep each tab's views in the state the user left them,
sort of like multitasking... kinda :) )
Hope that makes some sense.
2011/5/19 Andreas Ploetzeneder <[email protected]>:
> Hi,
> i have some UITabbar, and when i click on this it reacts really slow :/
> code is here:
> http://www.ploetzeneder-it.com/Main.cs
> maybe somebody can help me,...
>
>
>
> --
>
>
>
>
>
> Mit freundlichem Gruß,
>
> Andreas Plötzeneder
> CEO
> ihr ploetzeneder it-solutions Team
> Mobile Development – Desktopanwendungen – Webanwendungen
> Tel: +43 720 30 30 24 10
> Fax: +43 720 30 30 24 20
> Email: [email protected]
> web: http://www.ploetzeneder-it.com
>
> Der Inhalt dieser E-Mail samt aller Anhänge ist vertraulich
> und ausschließlich für den Adressaten bestimmt. Wenn Sie nicht der
> vorgesehene Adressat dieser E-Mail oder dessen Vertreter sind, so löschen
> sie diese bitte und informieren Sie den Absender. Jede Form der Verbreitung
> oder Veröffentlichung der E-Mail, sei es in ihrer Gesamtheit oder in Teilen,
> die nicht ihrem Zweck dient, ist unzulässig. Das Internet kann die
> Unversehrtheit dieser Mitteilung nicht garantieren. ploetzeneder
> it-solutions übernimmt daher keine Haftung, falls die E-Mail geändert wurde.
>
>
>
> _______________________________________________
> MonoTouch mailing list
> [email protected]
> http://lists.ximian.com/mailman/listinfo/monotouch
>
>
--
Nic Wise
t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
b. http://www.fastchicken.co.nz/ | http://www.flickr.com/photos/nicwise
mobileAgent (for FreeAgent): get your accounts in your pocket.
http://goo.gl/IuBU
Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa
London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch