Hello!
I've googled and googled, and dont seem to find any complete answer to my question.
I can't find the solution to how i can add actions to my tab bar items.
I have a Delegate class:
and the implementation
and i've created seperate classes(with XIB files) for each tab bar item. The switching between views works beautifully. The problem is however, when someone select a view, i want the content in that view to be refreshed.
I've seen the documentation, and especially tried to understand the didSelectItem method, but i cant figure out how its working. Can someone please push me in the right direction? I dont understand how the methods in the delegate class can acess the content in another view?
I've googled and googled, and dont seem to find any complete answer to my question.
I can't find the solution to how i can add actions to my tab bar items.
I have a Delegate class:
Code:
@interface MyProjectAppDelegate : NSObject <UIApplicationDelegate, UITabBarControllerDelegate> {
UIWindow *window;
UITabBarController *rootController;
}
and the implementation
Code:
#import "MyProjectAppDelegate.h"
@implementation MyProjectAppDelegate
@synthesize window;
@synthesize rootController;
#pragma mark -
#pragma mark Application lifecycle
-(void) applicationDidFinishLaunching:(UIApplication *)application{
[window addSubview:rootController.view];
[window makeKeyAndVisible];
}
and i've created seperate classes(with XIB files) for each tab bar item. The switching between views works beautifully. The problem is however, when someone select a view, i want the content in that view to be refreshed.
I've seen the documentation, and especially tried to understand the didSelectItem method, but i cant figure out how its working. Can someone please push me in the right direction? I dont understand how the methods in the delegate class can acess the content in another view?