summaryrefslogtreecommitdiff
path: root/navit/iphone
diff options
context:
space:
mode:
Diffstat (limited to 'navit/iphone')
-rw-r--r--navit/iphone/downloader/Classes/DownloaderAppDelegate.h2
-rw-r--r--navit/iphone/downloader/Classes/DownloaderAppDelegate.m8
-rw-r--r--navit/iphone/downloader/Classes/DownloaderDetailViewController.m6
-rw-r--r--navit/iphone/downloader/Classes/RootViewController.h4
-rw-r--r--navit/iphone/downloader/Classes/RootViewController.m38
-rw-r--r--navit/iphone/downloader/main.m2
6 files changed, 30 insertions, 30 deletions
diff --git a/navit/iphone/downloader/Classes/DownloaderAppDelegate.h b/navit/iphone/downloader/Classes/DownloaderAppDelegate.h
index 3227e6b8f..e0cc8dc10 100644
--- a/navit/iphone/downloader/Classes/DownloaderAppDelegate.h
+++ b/navit/iphone/downloader/Classes/DownloaderAppDelegate.h
@@ -9,7 +9,7 @@
#import <UIKit/UIKit.h>
@interface DownloaderAppDelegate : NSObject <UIApplicationDelegate> {
-
+
UIWindow *window;
UINavigationController *navigationController;
}
diff --git a/navit/iphone/downloader/Classes/DownloaderAppDelegate.m b/navit/iphone/downloader/Classes/DownloaderAppDelegate.m
index ff8a093a8..51b0d3705 100644
--- a/navit/iphone/downloader/Classes/DownloaderAppDelegate.m
+++ b/navit/iphone/downloader/Classes/DownloaderAppDelegate.m
@@ -19,10 +19,10 @@
#pragma mark -
#pragma mark Application lifecycle
-- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
-
+- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
+
// Override point for customization after application launch.
-
+
// Set the navigation controller as the window's root view controller and display.
self.window.rootViewController = self.navigationController;
[self.window makeKeyAndVisible];
@@ -41,7 +41,7 @@
- (void)applicationDidEnterBackground:(UIApplication *)application {
/*
- Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
+ Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
*/
}
diff --git a/navit/iphone/downloader/Classes/DownloaderDetailViewController.m b/navit/iphone/downloader/Classes/DownloaderDetailViewController.m
index 97e24b1c4..2b1633ece 100644
--- a/navit/iphone/downloader/Classes/DownloaderDetailViewController.m
+++ b/navit/iphone/downloader/Classes/DownloaderDetailViewController.m
@@ -28,7 +28,7 @@
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
-
+
// Sets the Navigation bar to have the location name
self.title = [self.locationName objectForKey:NAME_KEY];
@@ -47,7 +47,7 @@
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
-
+
// Release any cached data, images, etc. that aren't in use.
}
@@ -60,7 +60,7 @@
-(void) viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
}
-
+
- (void)dealloc {
[locationName_ release];
[super dealloc];
diff --git a/navit/iphone/downloader/Classes/RootViewController.h b/navit/iphone/downloader/Classes/RootViewController.h
index 5cfe64cd4..2d8a6b7af 100644
--- a/navit/iphone/downloader/Classes/RootViewController.h
+++ b/navit/iphone/downloader/Classes/RootViewController.h
@@ -8,10 +8,10 @@
#import <UIKit/UIKit.h>
-@interface RootViewController : UITableViewController
+@interface RootViewController : UITableViewController
{
NSMutableArray* locations_;
-
+
}
@property (nonatomic, retain) NSMutableArray* locations;
diff --git a/navit/iphone/downloader/Classes/RootViewController.m b/navit/iphone/downloader/Classes/RootViewController.m
index d2820fe3c..9bf6c855e 100644
--- a/navit/iphone/downloader/Classes/RootViewController.m
+++ b/navit/iphone/downloader/Classes/RootViewController.m
@@ -20,14 +20,14 @@
- (void)viewDidLoad {
[super viewDidLoad];
-
+
// Sets the title of the Navigation bar.
self.title= @"Navit Map Downloader";
-
+
// Loads in the array for locations and their associated bounding boxes
NSString *path = [[NSBundle mainBundle] pathForResource:@"LocationsArray" ofType:@"plist"];
- locations_ = [[NSMutableArray alloc] initWithContentsOfFile:path];
-
+ locations_ = [[NSMutableArray alloc] initWithContentsOfFile:path];
+
// Uncomment the following line to display an Edit button in the navigation bar for this view controller.
// self.navigationItem.rightBarButtonItem = self.editButtonItem;
}
@@ -80,21 +80,21 @@
// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-
+
static NSString *CellIdentifier = @"Cell";
-
+
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
-
+
// Configure the cell.
-
+
// Gets the location name from LocationsArray.plist
cell.textLabel.text = [[self.locations objectAtIndex:indexPath.row] objectForKey:NAME_KEY];
-
+
//Makes the fancy arrows to the left of the region being downloaded (e.g. "Ireland > " )
- cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
+ cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
return cell;
}
@@ -111,14 +111,14 @@
/*
// Override to support editing the table view.
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
-
+
if (editingStyle == UITableViewCellEditingStyleDelete) {
// Delete the row from the data source.
[tableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
- }
+ }
else if (editingStyle == UITableViewCellEditingStyleInsert) {
// Create a new instance of the appropriate class, insert it into the array, and add a new row to the table view.
- }
+ }
}
*/
@@ -143,18 +143,18 @@
#pragma mark Table view delegate
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-
+
DownloaderDetailViewController *detailViewController = [[DownloaderDetailViewController alloc] initWithNibName:@"DownloaderDetailViewController" bundle:nil];
- // Sets the "Back" button in the next ViewController (DownloaderDetailViewController).
+ // Sets the "Back" button in the next ViewController (DownloaderDetailViewController).
// Which, be default, pulls the name from the previous ViewController
// Here, we manually call it the text label "Back"
self.navigationItem.backBarButtonItem = [[[UIBarButtonItem alloc] initWithTitle:@"Back" style:UIBarButtonItemStylePlain target:nil action:nil] autorelease];
-
+
// Pass the selected object to the new view controller.
detailViewController.locationName = [self.locations objectAtIndex:indexPath.row];
- [self.navigationController pushViewController:detailViewController animated:YES];
-
+ [self.navigationController pushViewController:detailViewController animated:YES];
+
[DownloaderDetailViewController release];
}
@@ -165,7 +165,7 @@
- (void)didReceiveMemoryWarning {
// Releases the view if it doesn't have a superview.
[super didReceiveMemoryWarning];
-
+
// Relinquish ownership any cached data, images, etc that aren't in use.
}
diff --git a/navit/iphone/downloader/main.m b/navit/iphone/downloader/main.m
index e18fb9c59..39d344c1f 100644
--- a/navit/iphone/downloader/main.m
+++ b/navit/iphone/downloader/main.m
@@ -9,7 +9,7 @@
#import <UIKit/UIKit.h>
int main(int argc, char *argv[]) {
-
+
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, nil);
[pool release];