tags:

views:

87

answers:

0

Hi,

In my application I m using this patter to call other ViewController :-

@class FrmProfileLookup;

//Global Variables
NSObject *mainWindow;

NSInteger int_GProfileLookupParentScreenNumber;
NSInteger int_GProfileEntryParentScreenNumber;

@interface UV_AlarmAppDelegate : NSObject <UIApplicationDelegate> 
{
    UIWindow *window;
    NSMutableArray *profileArray;

    IBOutlet UINavigationController *navigationController;

    IBOutlet FrmProfileLookup *frmProfileLookupLink;

    IBOutlet frmEditProfileLookup *frmEditProfileLookupLink;
}

@property(nonatomic,retain) NSMutableArray *profileArray;
@property(nonatomic,retain) IBOutlet UIWindow *window;
@property(nonatomic,retain) IBOutlet UINavigationController *navigationController;
@property(nonatomic,retain) IBOutlet FrmProfileLookup *frmProfileLookupLink;


+(UV_AlarmAppDelegate *)getMainWindowHandle;
+(void) setMainWindowhandle:(UV_AlarmAppDelegate*)mainWindowHandle;


#import "UV_AlarmAppDelegate.h"
#import "FrmProfileLookup.h"

@implementation UV_AlarmAppDelegate
@synthesize window,navigationController,profileArray,frmProfileLookupLink;
- (void)applicationDidFinishLaunching:(UIApplication *)application 
{  
    [UV_AlarmAppDelegate setMainWindowhandle:self];

    [self createEditableCopyOfDatabaseIfNeeded];    
    NSMutableArray *tempArray = [[NSMutableArray alloc] init];
    self.profileArray = tempArray;
    [tempArray release];    

    navigationController = [[UINavigationController alloc] initWithRootViewController:FrmFlashScreenLink];
    navigationController.navigationBarHidden = YES;

    [window addSubview:navigationController.view];
    // Override point for customization after application launch
    [window makeKeyAndVisible];
    [FrmFlashScreenLink showSplash] ;
}

+(UV_AlarmAppDelegate *)getMainWindowHandle
{
    return (UV_AlarmAppDelegate *)mainWindow;
}

+(void) setMainWindowhandle:(UV_AlarmAppDelegate*)mainWindowHandle;
{
    if (mainWindow == nil)
    {
        mainWindow = (NSObject *)mainWindowHandle;
    }
}


Now my in my frmProfileLookUp implementation file I m calling my other Viewcontroller in the following way  -

[[UV_AlarmAppDelegate getMainWindowHandle].frmProfileLookupLink release];
        //[[UV_AlarmAppDelegate getMainWindowHandle].navigationController release]; 
        [UV_AlarmAppDelegate getMainWindowHandle].navigationController = [[UINavigationController alloc] initWithRootViewController: [UV_AlarmAppDelegate getMainWindowHandle].frmProfileEntryLink];
        [UV_AlarmAppDelegate getMainWindowHandle].frmProfileEntryLink.val =1;
        [UV_AlarmAppDelegate getMainWindowHandle].navigationController.navigationBarHidden = YES;
        [[UV_AlarmAppDelegate getMainWindowHandle].window addSubview:[UV_AlarmAppDelegate getMainWindowHandle].navigationController.view];
        //[[UV_AlarmAppDelegate getMainWindowHandle].frmProfileEntryLink viewDidLoad];
        // Override point for customization after application launch
        [[UV_AlarmAppDelegate getMainWindowHandle].window makeKeyAndVisible];

But Problem is that when I call other View controller On which I used Viewcontroller with TableView then my frmProfileLookUp file doesnt get refresh.

So Iwant to know how do I refresh the ViewController use base class is UIViewcontroller get refresh when any update, delete,add query is fired bcoz the way Im calling other controller will not refresh the view.

Please Its urgent If any one can understand my problem

Thanks in Advance

@end