Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
- {
- // Override point for customization after application launch.
- // Add the tab bar controller's current view as a subview of the window
- application.applicationSupportsShakeToEdit = YES;
- [[self.tabBarController.tabBar.items objectAtIndex:0] setTitle:[Util getLangValueForTag:@"menufleet"]];
- [[self.tabBarController.tabBar.items objectAtIndex:1] setTitle:[Util getLangValueForTag:@"menuevent"]];
- [[self.tabBarController.tabBar.items objectAtIndex:2] setTitle:[Util getLangValueForTag:@"menusettings"]];
- if(![Util openConfigurationFile])
- {
- NSString* noFileMessage = @"Welcome to iEvo Fleet.nYou'll be now redirected to the settings area to provide your Evolution account information.";
- UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Welcome" message:noFileMessage delegate:self cancelButtonTitle:@"Ok" otherButtonTitles:nil, nil];
- [alert show];
- [alert release];
- }
- else
- {
- LoginWS* service = [LoginWS service];
- [service Login:self action:@selector(LoginHandler:) username:[Util getConfigLoginName] password:[Util getConfigLoginPassword]];
- }
- [self.window makeKeyAndVisible];
- return YES;
- }
- - (void)alertView:(UIAlertView *)alertView willDismissWithButtonIndex:(NSInteger)buttonIndex
- {
- if([alertView.title isEqualToString:@"File error"] ||
- [alertView.title isEqualToString:@"Login error"] ||
- [alertView.title isEqualToString:@"Welcome"])
- {
- if(buttonIndex == 0)
- {
- [self.tabBarController setSelectedIndex:2];
- self.window.rootViewController = self.tabBarController;
- }
- }
- }
Add Comment
Please, Sign In to add comment