Permalink
Browse files

note working with modified ui

  • Loading branch information...
1 parent 567f94a commit da2cf35ddd12d9f9bf1b2cf55339203b482a1ac0 @davidchiles committed Apr 16, 2012
@@ -255,6 +255,10 @@
6383949714EC7DAC00C74A57 /* GTMHTTPFetcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 6383949214EC7DAC00C74A57 /* GTMHTTPFetcher.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
6383949814EC7DAC00C74A57 /* GTMOAuthViewTouch.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6383949314EC7DAC00C74A57 /* GTMOAuthViewTouch.xib */; };
6383949A14EC85C100C74A57 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6383949914EC85C100C74A57 /* Security.framework */; };
+ 6396829F153CBD82008F4C0E /* icon-29.png in Resources */ = {isa = PBXBuildFile; fileRef = 6396829B153CBD82008F4C0E /* icon-29.png */; };
+ 639682A0153CBD82008F4C0E /* icon-29@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6396829C153CBD82008F4C0E /* icon-29@2x.png */; };
+ 639682A1153CBD82008F4C0E /* icon-512.png in Resources */ = {isa = PBXBuildFile; fileRef = 6396829D153CBD82008F4C0E /* icon-512.png */; };
+ 639682A2153CBD82008F4C0E /* icon-512@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 6396829E153CBD82008F4C0E /* icon-512@2x.png */; };
63A2DB3D152257FA000C095D /* userLocation.png in Resources */ = {isa = PBXBuildFile; fileRef = 63A2DB3B152257FA000C095D /* userLocation.png */; };
63A2DB3E152257FA000C095D /* userLocation@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 63A2DB3C152257FA000C095D /* userLocation@2x.png */; };
63A2DB4515226CF6000C095D /* gear.png in Resources */ = {isa = PBXBuildFile; fileRef = 63A2DB4315226CF6000C095D /* gear.png */; };
@@ -296,10 +300,6 @@
63E4BF1A14E068EC00E0BD46 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 63E4BF1914E068EC00E0BD46 /* libz.dylib */; };
63E4BF3114E0728200E0BD46 /* NSDataAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = 63E4BF2E14E0728200E0BD46 /* NSDataAdditions.m */; };
63E4BF3214E0728200E0BD46 /* TBXML.m in Sources */ = {isa = PBXBuildFile; fileRef = 63E4BF3014E0728200E0BD46 /* TBXML.m */; };
- 63E525C01534C44A00D2DA35 /* icon-29.png in Resources */ = {isa = PBXBuildFile; fileRef = 63E525BA1534C44A00D2DA35 /* icon-29.png */; };
- 63E525C11534C44A00D2DA35 /* icon-29@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 63E525BB1534C44A00D2DA35 /* icon-29@2x.png */; };
- 63E525C41534C44A00D2DA35 /* icon-512.png in Resources */ = {isa = PBXBuildFile; fileRef = 63E525BE1534C44A00D2DA35 /* icon-512.png */; };
- 63E525C51534C44A00D2DA35 /* icon-512@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 63E525BF1534C44A00D2DA35 /* icon-512@2x.png */; };
63E525D21534D90500D2DA35 /* OPECreditViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 63E525D01534D90200D2DA35 /* OPECreditViewController.m */; };
63E525D31534D90500D2DA35 /* OPECreditViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 63E525D11534D90200D2DA35 /* OPECreditViewController.xib */; };
63E525D91534E66500D2DA35 /* about.html in Resources */ = {isa = PBXBuildFile; fileRef = 63E525D81534E66500D2DA35 /* about.html */; };
@@ -613,6 +613,10 @@
6383949314EC7DAC00C74A57 /* GTMOAuthViewTouch.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = GTMOAuthViewTouch.xib; sourceTree = "<group>"; };
6383949914EC85C100C74A57 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
63968298153CB8B4008F4C0E /* OPEAPIConstants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OPEAPIConstants.h; sourceTree = "<group>"; };
+ 6396829B153CBD82008F4C0E /* icon-29.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-29.png"; sourceTree = "<group>"; };
+ 6396829C153CBD82008F4C0E /* icon-29@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-29@2x.png"; sourceTree = "<group>"; };
+ 6396829D153CBD82008F4C0E /* icon-512.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-512.png"; sourceTree = "<group>"; };
+ 6396829E153CBD82008F4C0E /* icon-512@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-512@2x.png"; sourceTree = "<group>"; };
63A2DB3B152257FA000C095D /* userLocation.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = userLocation.png; sourceTree = "<group>"; };
63A2DB3C152257FA000C095D /* userLocation@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "userLocation@2x.png"; sourceTree = "<group>"; };
63A2DB4315226CF6000C095D /* gear.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = gear.png; sourceTree = "<group>"; };
@@ -716,10 +720,6 @@
63E4BF2E14E0728200E0BD46 /* NSDataAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSDataAdditions.m; sourceTree = "<group>"; };
63E4BF2F14E0728200E0BD46 /* TBXML.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TBXML.h; sourceTree = "<group>"; };
63E4BF3014E0728200E0BD46 /* TBXML.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TBXML.m; sourceTree = "<group>"; };
- 63E525BA1534C44A00D2DA35 /* icon-29.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-29.png"; sourceTree = "<group>"; };
- 63E525BB1534C44A00D2DA35 /* icon-29@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-29@2x.png"; sourceTree = "<group>"; };
- 63E525BE1534C44A00D2DA35 /* icon-512.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-512.png"; sourceTree = "<group>"; };
- 63E525BF1534C44A00D2DA35 /* icon-512@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "icon-512@2x.png"; sourceTree = "<group>"; };
63E525CF1534D90200D2DA35 /* OPECreditViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OPECreditViewController.h; sourceTree = "<group>"; };
63E525D01534D90200D2DA35 /* OPECreditViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OPECreditViewController.m; sourceTree = "<group>"; };
63E525D11534D90200D2DA35 /* OPECreditViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = OPECreditViewController.xib; sourceTree = "<group>"; };
@@ -1298,10 +1298,10 @@
children = (
63E525E215362B7100D2DA35 /* icon.png */,
63E525E315362B7100D2DA35 /* icon@2x.png */,
- 63E525BA1534C44A00D2DA35 /* icon-29.png */,
- 63E525BB1534C44A00D2DA35 /* icon-29@2x.png */,
- 63E525BE1534C44A00D2DA35 /* icon-512.png */,
- 63E525BF1534C44A00D2DA35 /* icon-512@2x.png */,
+ 6396829B153CBD82008F4C0E /* icon-29.png */,
+ 6396829C153CBD82008F4C0E /* icon-29@2x.png */,
+ 6396829D153CBD82008F4C0E /* icon-512.png */,
+ 6396829E153CBD82008F4C0E /* icon-512@2x.png */,
);
name = "App Icon";
sourceTree = "<group>";
@@ -1422,10 +1422,6 @@
63A2DB4615226CF6000C095D /* gear@2x.png in Resources */,
6325B4451534B28B00C8691F /* location.png in Resources */,
6325B4461534B28B00C8691F /* location@2x.png in Resources */,
- 63E525C01534C44A00D2DA35 /* icon-29.png in Resources */,
- 63E525C11534C44A00D2DA35 /* icon-29@2x.png in Resources */,
- 63E525C41534C44A00D2DA35 /* icon-512.png in Resources */,
- 63E525C51534C44A00D2DA35 /* icon-512@2x.png in Resources */,
63E525D31534D90500D2DA35 /* OPECreditViewController.xib in Resources */,
63E525D91534E66500D2DA35 /* about.html in Resources */,
63E525E0153627B700D2DA35 /* default.png in Resources */,
@@ -1641,6 +1637,10 @@
6310F6661537A46D00C65FD8 /* zoo@2x.png in Resources */,
63214B2D153CB382001C9A58 /* stardavid.png in Resources */,
63214B2F153CB390001C9A58 /* stardavid@2x.png in Resources */,
+ 6396829F153CBD82008F4C0E /* icon-29.png in Resources */,
+ 639682A0153CBD82008F4C0E /* icon-29@2x.png in Resources */,
+ 639682A1153CBD82008F4C0E /* icon-512.png in Resources */,
+ 639682A2153CBD82008F4C0E /* icon-512@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -37,11 +37,11 @@
continueAfterRunningActions = "No"
isPathRelative = "1"
filePath = "OSM POI Editor/OPENodeViewController.m"
- timestampString = "356059160.182623"
+ timestampString = "356306971.009715"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "489"
- endingLineNumber = "489"
+ startingLineNumber = "530"
+ endingLineNumber = "530"
landmarkName = "-viewDidAppear:"
landmarkType = "5">
</FileBreakpoint>
@@ -190,26 +190,26 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "OSM POI Editor/OPENodeViewController.m"
- timestampString = "356059160.182623"
+ timestampString = "356306971.009715"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "398"
- endingLineNumber = "398"
- landmarkName = "-setText:"
- landmarkType = "5">
+ startingLineNumber = "439"
+ endingLineNumber = "439"
+ landmarkName = "@implementation OPENodeViewController"
+ landmarkType = "3">
</FileBreakpoint>
<FileBreakpoint
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "OSM POI Editor/OPENodeViewController.m"
- timestampString = "356059160.182623"
+ timestampString = "356306971.009715"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "396"
- endingLineNumber = "396"
- landmarkName = "-setText:"
- landmarkType = "5">
+ startingLineNumber = "437"
+ endingLineNumber = "437"
+ landmarkName = "@implementation OPENodeViewController"
+ landmarkType = "3">
</FileBreakpoint>
<FileBreakpoint
shouldBeEnabled = "No"
@@ -229,11 +229,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "OSM POI Editor/OPENodeViewController.m"
- timestampString = "355887833.471326"
+ timestampString = "356306971.009715"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "202"
- endingLineNumber = "202"
+ startingLineNumber = "216"
+ endingLineNumber = "216"
landmarkName = "-tableView:didSelectRowAtIndexPath:"
landmarkType = "5">
</FileBreakpoint>
@@ -242,11 +242,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "OSM POI Editor/OPENodeViewController.m"
- timestampString = "356056965.322886"
+ timestampString = "356306971.009715"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "225"
- endingLineNumber = "225"
+ startingLineNumber = "239"
+ endingLineNumber = "239"
landmarkName = "-tableView:didSelectRowAtIndexPath:"
landmarkType = "5">
</FileBreakpoint>
@@ -268,11 +268,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "OSM POI Editor/OPENodeViewController.m"
- timestampString = "356059160.182623"
+ timestampString = "356306971.009715"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "479"
- endingLineNumber = "479"
+ startingLineNumber = "520"
+ endingLineNumber = "520"
landmarkName = "-uploadComplete:"
landmarkType = "5">
</FileBreakpoint>
@@ -333,14 +333,66 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "OSM POI Editor/OPENodeViewController.m"
- timestampString = "356059160.182623"
+ timestampString = "356306971.009715"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
- startingLineNumber = "429"
- endingLineNumber = "429"
+ startingLineNumber = "470"
+ endingLineNumber = "470"
landmarkName = "-setCategoryAndType:"
landmarkType = "5">
</FileBreakpoint>
+ <FileBreakpoint
+ shouldBeEnabled = "No"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ filePath = "OSM POI Editor/OPETextEdit.m"
+ timestampString = "356306755.7167"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "46"
+ endingLineNumber = "46"
+ landmarkName = "-viewDidLoad"
+ landmarkType = "5">
+ </FileBreakpoint>
+ <FileBreakpoint
+ shouldBeEnabled = "No"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ filePath = "OSM POI Editor/OPETextEdit.m"
+ timestampString = "356306755.7167"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "44"
+ endingLineNumber = "44"
+ landmarkName = "-viewDidLoad"
+ landmarkType = "5">
+ </FileBreakpoint>
+ <FileBreakpoint
+ shouldBeEnabled = "No"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ filePath = "OSM POI Editor/OPETextEdit.m"
+ timestampString = "356306691.504063"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "43"
+ endingLineNumber = "43"
+ landmarkName = "-viewDidLoad"
+ landmarkType = "5">
+ </FileBreakpoint>
+ <FileBreakpoint
+ shouldBeEnabled = "No"
+ ignoreCount = "0"
+ continueAfterRunningActions = "No"
+ filePath = "OSM POI Editor/OPETextEdit.m"
+ timestampString = "356306696.050832"
+ startingColumnNumber = "9223372036854775807"
+ endingColumnNumber = "9223372036854775807"
+ startingLineNumber = "40"
+ endingLineNumber = "40"
+ landmarkName = "-viewDidLoad"
+ landmarkType = "5">
+ </FileBreakpoint>
</FileBreakpoints>
<ExceptionBreakpoints>
<ExceptionBreakpoint
@@ -21,7 +21,7 @@
@end
-@interface OPENodeViewController : UIViewController <UITableViewDelegate, UITableViewDataSource, UIAlertViewDelegate, PassText, PassCategoryAndType, MBProgressHUDDelegate, UIAlertViewDelegate>
+@interface OPENodeViewController : UIViewController <UITableViewDelegate, UITableViewDataSource, UIAlertViewDelegate, editTextDelegate, PassCategoryAndType, MBProgressHUDDelegate, UIAlertViewDelegate>
{
UITableView *tableView;
OPETagInterpreter * tagInterpreter;
@@ -94,10 +94,10 @@ - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
// Return the number of sections.
if(theNewNode.ident<0)
{
- return 2;
+ return 3;
}
else {
- return 3;
+ return 4;
}
}
@@ -115,7 +115,10 @@ - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInte
else if (section == 1) {
return @"Category";
}
- else if (section == 2) {
+ else if (section == 2){
+ return @"Note";
+ }
+ else if (section == 3) {
return @""; //Delete Button Header
}
else {
@@ -163,7 +166,17 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
//cell.detailTextLabel.text = [NSString stringWithFormat:@"%d",indexPath.row];
}
- else if (indexPath.section == 2) {
+ else if (indexPath.section == 2)
+ {
+ cell = [self.tableView dequeueReusableCellWithIdentifier:CellIdentifier1];
+ if (cell == nil) {
+ cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier1];
+ }
+ cell.textLabel.text = [theNewNode.tags objectForKey:@"note"];
+ cell.accessoryType= UITableViewCellAccessoryDisclosureIndicator;
+
+ }
+ else if (indexPath.section == 3) {
cell = [self.tableView dequeueReusableCellWithIdentifier:CellIdentifier3];
if(cell == nil) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier3];
@@ -191,7 +204,8 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
OPETextEdit * viewer = [[OPETextEdit alloc] initWithNibName:@"OPETextEdit" bundle:nil];
viewer.title = @"Name";
- viewer.text = [theNewNode.tags objectForKey:@"name"];
+ viewer.osmValue = [theNewNode.tags objectForKey:@"name"];
+ viewer.osmKey = @"name";
[viewer setDelegate:self];
[self.navigationController pushViewController:viewer animated:YES];
@@ -231,6 +245,17 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath
[self.navigationController pushViewController:viewer animated:YES];
}
}
+ else if (indexPath.section == 2)
+ {
+ OPETextEdit * viewer = [[OPETextEdit alloc] initWithNibName:@"OPETextEdit" bundle:nil];
+
+ viewer.title = @"Note";
+ viewer.osmValue = [theNewNode.tags objectForKey:@"note"];
+ viewer.osmKey = @"note";
+ [viewer setDelegate:self];
+
+ [self.navigationController pushViewController:viewer animated:YES];
+ }
}
-(void) showOauthError
{
@@ -389,6 +414,22 @@ - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)butto
}
+- (void) newTag:(NSDictionary *)tag
+{
+ NSString * osmKey = [tag objectForKey:@"osmKey"];
+ NSString * osmValue = [tag objectForKey:@"osmValue"];
+
+ if (![osmValue isEqualToString:@""])
+ {
+ [theNewNode.tags setObject:osmValue forKey:osmKey];
+ }
+ else {
+ [theNewNode.tags removeObjectForKey:osmKey];
+ }
+ [self.tableView reloadData];
+ NSLog(@"NewNode: %@",theNewNode.tags);
+}
+/*
- (void) setText:(NSString *)text
{
NSString * newName = [text stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]];
@@ -423,7 +464,7 @@ - (void) setText:(NSString *)text
//[self.tableView reloadData];
[self.tableView reloadSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:UITableViewRowAnimationFade];
}
-
+*/
- (void) setCategoryAndType:(NSDictionary *)cAndT
{
if ([catAndType count]==2) {
@@ -8,16 +8,17 @@
#import <UIKit/UIKit.h>
-@protocol PassText <NSObject>
+@protocol editTextDelegate <NSObject>
@required
-- (void) setText:(NSString *)text;
+- (void) newTag:(NSDictionary *)text;
@end
-@interface OPETextEdit : UIViewController
+@interface OPETextEdit : UIViewController <UITextViewDelegate>
-@property (nonatomic, retain) NSString * text;
+@property (nonatomic, retain) NSString * osmValue;
@property (nonatomic, retain) IBOutlet UITextView * textView;
+@property (nonatomic, strong) NSString * osmKey;
@property (retain) id delegate;
Oops, something went wrong.

0 comments on commit da2cf35

Please sign in to comment.