I did it this way:
tabBar.Delegate = new BTTabBarControllerDelegate(this);
public class BTTabBarControllerDelegate : UITabBarControllerDelegate
{
AppDelegate container;
public BTTabBarControllerDelegate(AppDelegate container)
{
this.container = container;
}
public override bool ShouldSelectViewController
(UITabBarController tabBarController, UIViewController viewController)
{
return
container.TabBarShouldSelectViewController(tabBarController,
viewController);
}
}
I think DidSelectViewController is in there too (not infront of my
mac, so can't check)
HOWEVER if you dont otherwise need the delegate, you should be able to
use the tabarcontroller directly:
tabBar.ViewControllerSelected += delegate(object sender,
UITabBarSelectionEventArgs e) {
if (e.ViewController.TabBarItem.Title == "Home")
{
home.RefreshFromDatastore();
home.NavigationController.PopToViewController(home.NavigationController.ViewControllers[0],
false);
}
};
On Wed, May 23, 2012 at 9:58 AM, Slicc <[email protected]> wrote:
> Does anyone know where the DidSelectViewController method is in the
> UITabBarController? I would like to override it to get animation between tab
> views working.
>
> Thanks,
>
> Slicc
>
> --
> View this message in context:
> http://monotouch.2284126.n4.nabble.com/UITabBarController-DidSelectViewController-tp4651308.html
> Sent from the MonoTouch mailing list archive at Nabble.com.
> _______________________________________________
> 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/
Earnest: Self-employed? Track your business expenses and income.
http://earnestapp.com
Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p
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