Commit 254682d8ba92f57fb9db8ee639d71e4827abb344
1 parent
574edda5
--no commit message
Showing
18 changed files
with
217 additions
and
118 deletions
DUREX Vendor Control/CommunicationProtocol.m
@@ -53,7 +53,7 @@ | @@ -53,7 +53,7 @@ | ||
53 | } | 53 | } |
54 | onFail:^(NSError *error) | 54 | onFail:^(NSError *error) |
55 | { | 55 | { |
56 | - NSLog(@"%@",error); | 56 | + NSLog(@"[CommunicationProtocol.m]: %@",error); |
57 | numPackets = 0; | 57 | numPackets = 0; |
58 | }]; | 58 | }]; |
59 | if(numPackets) | 59 | if(numPackets) |
@@ -66,7 +66,7 @@ | @@ -66,7 +66,7 @@ | ||
66 | } | 66 | } |
67 | onFail:^(NSError *error) | 67 | onFail:^(NSError *error) |
68 | { | 68 | { |
69 | - NSLog(@"%@",error); | 69 | + NSLog(@"[CommunicationProtocol.m]: %@",error); |
70 | numBytes = 0; | 70 | numBytes = 0; |
71 | }]; | 71 | }]; |
72 | if(numBytes) | 72 | if(numBytes) |
@@ -77,7 +77,7 @@ | @@ -77,7 +77,7 @@ | ||
77 | } | 77 | } |
78 | onFail:^(NSError *error) | 78 | onFail:^(NSError *error) |
79 | { | 79 | { |
80 | - NSLog(@"%@",error); | 80 | + NSLog(@"[CommunicationProtocol.m]: %@",error); |
81 | }]; | 81 | }]; |
82 | } | 82 | } |
83 | } | 83 | } |
@@ -89,7 +89,7 @@ | @@ -89,7 +89,7 @@ | ||
89 | } | 89 | } |
90 | onFail:^(NSError *error) | 90 | onFail:^(NSError *error) |
91 | { | 91 | { |
92 | - NSLog(@"%@",error); | 92 | + NSLog(@"[CommunicationProtocol.m]: %@",error); |
93 | } | 93 | } |
94 | ]; | 94 | ]; |
95 | return message; | 95 | return message; |
@@ -106,7 +106,7 @@ | @@ -106,7 +106,7 @@ | ||
106 | } | 106 | } |
107 | onFail:^(NSError *error) | 107 | onFail:^(NSError *error) |
108 | { | 108 | { |
109 | - NSLog(@"%@",error); | 109 | + NSLog(@"[CommunicationProtocol.m]: %@",error); |
110 | status = FALSE; | 110 | status = FALSE; |
111 | } | 111 | } |
112 | ]; | 112 | ]; |
@@ -135,7 +135,7 @@ | @@ -135,7 +135,7 @@ | ||
135 | } | 135 | } |
136 | onFail:^(NSError *error) | 136 | onFail:^(NSError *error) |
137 | { | 137 | { |
138 | - NSLog(@"%@",error); | 138 | + NSLog(@"[CommunicationProtocol.m]: %@",error); |
139 | status = FALSE; | 139 | status = FALSE; |
140 | } | 140 | } |
141 | ]; | 141 | ]; |
@@ -149,7 +149,7 @@ | @@ -149,7 +149,7 @@ | ||
149 | } | 149 | } |
150 | onFail:^(NSError *error) | 150 | onFail:^(NSError *error) |
151 | { | 151 | { |
152 | - NSLog(@"%@",error); | 152 | + NSLog(@"[CommunicationProtocol.m]: %@",error); |
153 | status = FALSE; | 153 | status = FALSE; |
154 | } | 154 | } |
155 | ]; | 155 | ]; |
@@ -161,7 +161,7 @@ | @@ -161,7 +161,7 @@ | ||
161 | } | 161 | } |
162 | onFail:^(NSError *error) | 162 | onFail:^(NSError *error) |
163 | { | 163 | { |
164 | - NSLog(@"%@",error); | 164 | + NSLog(@"[CommunicationProtocol.m]: %@",error); |
165 | status = FALSE; | 165 | status = FALSE; |
166 | } | 166 | } |
167 | ]; | 167 | ]; |
DUREX Vendor Control/DUREX Vendor Control.xcodeproj/project.pbxproj
@@ -272,7 +272,7 @@ | @@ -272,7 +272,7 @@ | ||
272 | isa = PBXProject; | 272 | isa = PBXProject; |
273 | attributes = { | 273 | attributes = { |
274 | CLASSPREFIX = EM; | 274 | CLASSPREFIX = EM; |
275 | - LastUpgradeCheck = 0500; | 275 | + LastUpgradeCheck = 0510; |
276 | ORGANIZATIONNAME = Emmoco; | 276 | ORGANIZATIONNAME = Emmoco; |
277 | TargetAttributes = { | 277 | TargetAttributes = { |
278 | 3471867718070D9300FA0FB2 = { | 278 | 3471867718070D9300FA0FB2 = { |
@@ -369,7 +369,6 @@ | @@ -369,7 +369,6 @@ | ||
369 | isa = XCBuildConfiguration; | 369 | isa = XCBuildConfiguration; |
370 | buildSettings = { | 370 | buildSettings = { |
371 | ALWAYS_SEARCH_USER_PATHS = NO; | 371 | ALWAYS_SEARCH_USER_PATHS = NO; |
372 | - ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; | ||
373 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; | 372 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; |
374 | CLANG_CXX_LIBRARY = "libc++"; | 373 | CLANG_CXX_LIBRARY = "libc++"; |
375 | CLANG_ENABLE_MODULES = YES; | 374 | CLANG_ENABLE_MODULES = YES; |
@@ -409,7 +408,6 @@ | @@ -409,7 +408,6 @@ | ||
409 | isa = XCBuildConfiguration; | 408 | isa = XCBuildConfiguration; |
410 | buildSettings = { | 409 | buildSettings = { |
411 | ALWAYS_SEARCH_USER_PATHS = NO; | 410 | ALWAYS_SEARCH_USER_PATHS = NO; |
412 | - ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; | ||
413 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; | 411 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; |
414 | CLANG_CXX_LIBRARY = "libc++"; | 412 | CLANG_CXX_LIBRARY = "libc++"; |
415 | CLANG_ENABLE_MODULES = YES; | 413 | CLANG_ENABLE_MODULES = YES; |
@@ -442,7 +440,6 @@ | @@ -442,7 +440,6 @@ | ||
442 | 3471868A18070D9300FA0FB2 /* Debug */ = { | 440 | 3471868A18070D9300FA0FB2 /* Debug */ = { |
443 | isa = XCBuildConfiguration; | 441 | isa = XCBuildConfiguration; |
444 | buildSettings = { | 442 | buildSettings = { |
445 | - ARCHS = "$(ARCHS_STANDARD)"; | ||
446 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | 443 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
447 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; | 444 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; |
448 | GCC_PRECOMPILE_PREFIX_HEADER = YES; | 445 | GCC_PRECOMPILE_PREFIX_HEADER = YES; |
@@ -461,7 +458,6 @@ | @@ -461,7 +458,6 @@ | ||
461 | 3471868B18070D9300FA0FB2 /* Release */ = { | 458 | 3471868B18070D9300FA0FB2 /* Release */ = { |
462 | isa = XCBuildConfiguration; | 459 | isa = XCBuildConfiguration; |
463 | buildSettings = { | 460 | buildSettings = { |
464 | - ARCHS = "$(ARCHS_STANDARD)"; | ||
465 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | 461 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
466 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; | 462 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; |
467 | GCC_PRECOMPILE_PREFIX_HEADER = YES; | 463 | GCC_PRECOMPILE_PREFIX_HEADER = YES; |
@@ -480,7 +476,6 @@ | @@ -480,7 +476,6 @@ | ||
480 | 3471868D18070D9300FA0FB2 /* Debug */ = { | 476 | 3471868D18070D9300FA0FB2 /* Debug */ = { |
481 | isa = XCBuildConfiguration; | 477 | isa = XCBuildConfiguration; |
482 | buildSettings = { | 478 | buildSettings = { |
483 | - ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; | ||
484 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TestAppExample.app/TestAppExample"; | 479 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TestAppExample.app/TestAppExample"; |
485 | FRAMEWORK_SEARCH_PATHS = ( | 480 | FRAMEWORK_SEARCH_PATHS = ( |
486 | "$(SDKROOT)/Developer/Library/Frameworks", | 481 | "$(SDKROOT)/Developer/Library/Frameworks", |
@@ -503,7 +498,6 @@ | @@ -503,7 +498,6 @@ | ||
503 | 3471868E18070D9300FA0FB2 /* Release */ = { | 498 | 3471868E18070D9300FA0FB2 /* Release */ = { |
504 | isa = XCBuildConfiguration; | 499 | isa = XCBuildConfiguration; |
505 | buildSettings = { | 500 | buildSettings = { |
506 | - ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; | ||
507 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TestAppExample.app/TestAppExample"; | 501 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TestAppExample.app/TestAppExample"; |
508 | FRAMEWORK_SEARCH_PATHS = ( | 502 | FRAMEWORK_SEARCH_PATHS = ( |
509 | "$(SDKROOT)/Developer/Library/Frameworks", | 503 | "$(SDKROOT)/Developer/Library/Frameworks", |
DUREX Vendor Control/DUREX Vendor Control.xcodeproj/project.xcworkspace/xcuserdata/imanol.xcuserdatad/UserInterfaceState.xcuserstate
No preview for this file type
DUREX Vendor Control/DUREX Vendor Control.xcodeproj/xcuserdata/imanol.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
@@ -2,68 +2,4 @@ | @@ -2,68 +2,4 @@ | ||
2 | <Bucket | 2 | <Bucket |
3 | type = "1" | 3 | type = "1" |
4 | version = "2.0"> | 4 | version = "2.0"> |
5 | - <Breakpoints> | ||
6 | - <BreakpointProxy | ||
7 | - BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> | ||
8 | - <BreakpointContent | ||
9 | - shouldBeEnabled = "Yes" | ||
10 | - ignoreCount = "0" | ||
11 | - continueAfterRunningActions = "No" | ||
12 | - filePath = "CommunicationProtocol.m" | ||
13 | - timestampString = "422490789.923751" | ||
14 | - startingColumnNumber = "9223372036854775807" | ||
15 | - endingColumnNumber = "9223372036854775807" | ||
16 | - startingLineNumber = "20" | ||
17 | - endingLineNumber = "20" | ||
18 | - landmarkName = "+sharedProtocol" | ||
19 | - landmarkType = "5"> | ||
20 | - <Locations> | ||
21 | - <Location | ||
22 | - shouldBeEnabled = "Yes" | ||
23 | - ignoreCount = "0" | ||
24 | - continueAfterRunningActions = "No" | ||
25 | - symbolName = "+[CommunicationProtocol sharedProtocol]" | ||
26 | - moduleName = "DUREX Vendor Control" | ||
27 | - urlString = "file://localhost/Users/imanol/devel/durex/DUREX%20Vendor%20Control/CommunicationProtocol.m" | ||
28 | - timestampString = "428340358.431629" | ||
29 | - startingColumnNumber = "9223372036854775807" | ||
30 | - endingColumnNumber = "9223372036854775807" | ||
31 | - startingLineNumber = "20" | ||
32 | - endingLineNumber = "20" | ||
33 | - offsetFromSymbolStart = "68"> | ||
34 | - </Location> | ||
35 | - <Location | ||
36 | - shouldBeEnabled = "Yes" | ||
37 | - ignoreCount = "0" | ||
38 | - continueAfterRunningActions = "No" | ||
39 | - symbolName = "__39+[CommunicationProtocol sharedProtocol]_block_invoke" | ||
40 | - moduleName = "DUREX Vendor Control" | ||
41 | - urlString = "file://localhost/Users/imanol/devel/durex/DUREX%20Vendor%20Control/CommunicationProtocol.m" | ||
42 | - timestampString = "428340358.432031" | ||
43 | - startingColumnNumber = "9223372036854775807" | ||
44 | - endingColumnNumber = "9223372036854775807" | ||
45 | - startingLineNumber = "20" | ||
46 | - endingLineNumber = "20" | ||
47 | - offsetFromSymbolStart = "50"> | ||
48 | - </Location> | ||
49 | - </Locations> | ||
50 | - </BreakpointContent> | ||
51 | - </BreakpointProxy> | ||
52 | - <BreakpointProxy | ||
53 | - BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> | ||
54 | - <BreakpointContent | ||
55 | - shouldBeEnabled = "Yes" | ||
56 | - ignoreCount = "0" | ||
57 | - continueAfterRunningActions = "No" | ||
58 | - filePath = "MenuTableViewController.m" | ||
59 | - timestampString = "424594910.733215" | ||
60 | - startingColumnNumber = "9223372036854775807" | ||
61 | - endingColumnNumber = "9223372036854775807" | ||
62 | - startingLineNumber = "64" | ||
63 | - endingLineNumber = "64" | ||
64 | - landmarkName = "-initializeMenuEntries" | ||
65 | - landmarkType = "5"> | ||
66 | - </BreakpointContent> | ||
67 | - </BreakpointProxy> | ||
68 | - </Breakpoints> | ||
69 | </Bucket> | 5 | </Bucket> |
DUREX Vendor Control/MenuTableViewController.h
DUREX Vendor Control/MenuTableViewController.m
@@ -71,9 +71,12 @@ | @@ -71,9 +71,12 @@ | ||
71 | [self setCellIdentifiers:[[NSArray alloc] initWithObjects:CELL_IDENTIFIERS, nil]]; | 71 | [self setCellIdentifiers:[[NSArray alloc] initWithObjects:CELL_IDENTIFIERS, nil]]; |
72 | } | 72 | } |
73 | 73 | ||
74 | -- (void) changeNavLevel: (uint8_t) level | 74 | +- (void) changeNavLevel: (uint8_t) level : (BOOL) push |
75 | { | 75 | { |
76 | - [[self parentLayout] push: [NSNumber numberWithUnsignedChar:level]]; | 76 | + if(push) |
77 | + { | ||
78 | + [[self parentLayout] push: [NSNumber numberWithUnsignedChar:self.currentNavLevel]]; | ||
79 | + } | ||
77 | [self setCurrentNavLevel:level]; | 80 | [self setCurrentNavLevel:level]; |
78 | [self setCurrentCellIdentifier:[[self cellIdentifiers] objectAtIndex:[self currentNavLevel]]]; | 81 | [self setCurrentCellIdentifier:[[self cellIdentifiers] objectAtIndex:[self currentNavLevel]]]; |
79 | if([self currentNavLevel] == MAINTENANCE) | 82 | if([self currentNavLevel] == MAINTENANCE) |
@@ -95,6 +98,13 @@ | @@ -95,6 +98,13 @@ | ||
95 | [[self tableView] reloadSections:sections withRowAnimation:UITableViewRowAnimationAutomatic]; | 98 | [[self tableView] reloadSections:sections withRowAnimation:UITableViewRowAnimationAutomatic]; |
96 | } | 99 | } |
97 | 100 | ||
101 | +- (void) navBack | ||
102 | +{ | ||
103 | + NSNumber *prevLevel = [[self parentLayout] pop]; | ||
104 | + self.currentNavLevel = prevLevel.intValue; | ||
105 | + [self changeNavLevel: prevLevel.intValue : FALSE]; | ||
106 | +} | ||
107 | + | ||
98 | - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section | 108 | - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section |
99 | { | 109 | { |
100 | NSString *title = @""; | 110 | NSString *title = @""; |
@@ -136,7 +146,13 @@ | @@ -136,7 +146,13 @@ | ||
136 | 146 | ||
137 | //Set navigation level | 147 | //Set navigation level |
138 | [self initializeMenuEntries]; | 148 | [self initializeMenuEntries]; |
139 | - [self changeNavLevel:MENU]; | 149 | + self.currentNavLevel = 255; |
150 | + [self changeNavLevel:MENU:FALSE]; | ||
151 | + /* | ||
152 | + DUREXAppDelegate *appDelegate = (DUREXAppDelegate *)[[UIApplication sharedApplication] delegate]; | ||
153 | + CustomNavigationController *navController = [appDelegate navController]; | ||
154 | + navController.auxController = self; | ||
155 | + */ | ||
140 | 156 | ||
141 | // Uncomment the following line to preserve selection between presentations. | 157 | // Uncomment the following line to preserve selection between presentations. |
142 | // self.clearsSelectionOnViewWillAppear = NO; | 158 | // self.clearsSelectionOnViewWillAppear = NO; |
@@ -198,8 +214,9 @@ | @@ -198,8 +214,9 @@ | ||
198 | NSString *cellName = [[[[self tableView] cellForRowAtIndexPath:indexPath]textLabel]text]; | 214 | NSString *cellName = [[[[self tableView] cellForRowAtIndexPath:indexPath]textLabel]text]; |
199 | if([cellName isEqualToString:@"Maintenance"]) | 215 | if([cellName isEqualToString:@"Maintenance"]) |
200 | { | 216 | { |
201 | - NSLog(@"Changing to navLevel: MAINTENANCE"); | ||
202 | - [self changeNavLevel:MAINTENANCE]; | 217 | + NSLog(@"[MenuTableViewController.m]: Changing to navLevel: MAINTENANCE"); |
218 | + | ||
219 | + [self changeNavLevel:MAINTENANCE:TRUE]; | ||
203 | } | 220 | } |
204 | } | 221 | } |
205 | 222 | ||
@@ -217,15 +234,15 @@ | @@ -217,15 +234,15 @@ | ||
217 | 234 | ||
218 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | 235 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath |
219 | { | 236 | { |
220 | - NSLog(@"navLevel is %d",[self currentNavLevel]); | 237 | + NSLog(@"[MenuTableViewController.m]: navLevel is %d",[self currentNavLevel]); |
221 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:[self currentCellIdentifier] forIndexPath:indexPath]; | 238 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:[self currentCellIdentifier] forIndexPath:indexPath]; |
222 | 239 | ||
223 | if (cell == nil) | 240 | if (cell == nil) |
224 | { | 241 | { |
225 | - NSLog(@"Initializing cell"); | 242 | + NSLog(@"[MenuTableViewController.m]: Initializing cell"); |
226 | if([self currentNavLevel] == MAINTENANCE) | 243 | if([self currentNavLevel] == MAINTENANCE) |
227 | { | 244 | { |
228 | - NSLog(@"Dispatching Maintenance-type cell"); | 245 | + NSLog(@"[MenuTableViewController.m]: Dispatching Maintenance-type cell"); |
229 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:[self currentCellIdentifier]]; | 246 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:[self currentCellIdentifier]]; |
230 | } | 247 | } |
231 | else | 248 | else |
@@ -244,7 +261,7 @@ | @@ -244,7 +261,7 @@ | ||
244 | [[cell textLabel] setText:[[self currentElements] objectAtIndex:[indexPath row]+offset]]; | 261 | [[cell textLabel] setText:[[self currentElements] objectAtIndex:[indexPath row]+offset]]; |
245 | if([self currentNavLevel] == MAINTENANCE) | 262 | if([self currentNavLevel] == MAINTENANCE) |
246 | { | 263 | { |
247 | - NSLog(@"Customizing cell for navLevel MAINTENANCE"); | 264 | + NSLog(@"[MenuTableViewController.m]: Customizing cell for navLevel MAINTENANCE"); |
248 | [[cell detailTextLabel] setText:@"VALUE"]; | 265 | [[cell detailTextLabel] setText:@"VALUE"]; |
249 | [cell setAccessoryView: [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_checkmark"]]]; | 266 | [cell setAccessoryView: [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_checkmark"]]]; |
250 | if( [[[cell textLabel] text] isEqualToString:@"5€ Notes"]) | 267 | if( [[[cell textLabel] text] isEqualToString:@"5€ Notes"]) |
DUREX Vendor Control/Stack.m
@@ -27,7 +27,6 @@ | @@ -27,7 +27,6 @@ | ||
27 | - (void) push: (id) element | 27 | - (void) push: (id) element |
28 | { | 28 | { |
29 | [[self dataArray] addObject:element]; | 29 | [[self dataArray] addObject:element]; |
30 | - printf("%ld elements in array\n",(long)[self count]); | ||
31 | } | 30 | } |
32 | - (id) pop | 31 | - (id) pop |
33 | { | 32 | { |
@@ -42,7 +41,7 @@ | @@ -42,7 +41,7 @@ | ||
42 | } | 41 | } |
43 | - (void) clear | 42 | - (void) clear |
44 | { | 43 | { |
45 | - | 44 | + [[self dataArray] removeAllObjects]; |
46 | } | 45 | } |
47 | 46 | ||
48 | @end | 47 | @end |
DUREX tests/CustomNavigationController.h
0 → 100644
1 | +// | ||
2 | +// CustomNavigationController.h | ||
3 | +// DUREX test | ||
4 | +// | ||
5 | +// Created by Imanol Barba on 8/7/14. | ||
6 | +// Copyright (c) 2014 Emmoco. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import <UIKit/UIKit.h> | ||
10 | +#import "MenuTableViewController.h" | ||
11 | + | ||
12 | +@interface CustomNavigationController : UINavigationController | ||
13 | + | ||
14 | +@property (strong,nonatomic) MenuTableViewController *auxController; | ||
15 | + | ||
16 | +@end |
DUREX tests/CustomNavigationController.m
0 → 100644
1 | +// | ||
2 | +// CustomNavigationController.m | ||
3 | +// DUREX test | ||
4 | +// | ||
5 | +// Created by Imanol Barba on 8/7/14. | ||
6 | +// Copyright (c) 2014 Emmoco. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import "CustomNavigationController.h" | ||
10 | + | ||
11 | +@interface CustomNavigationController () | ||
12 | + | ||
13 | +@end | ||
14 | + | ||
15 | +@implementation CustomNavigationController | ||
16 | + | ||
17 | +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil | ||
18 | +{ | ||
19 | + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; | ||
20 | + if (self) { | ||
21 | + // Custom initialization | ||
22 | + } | ||
23 | + return self; | ||
24 | +} | ||
25 | + | ||
26 | +- (void)viewDidLoad | ||
27 | +{ | ||
28 | + [super viewDidLoad]; | ||
29 | + // Do any additional setup after loading the view. | ||
30 | +} | ||
31 | + | ||
32 | +- (void)didReceiveMemoryWarning | ||
33 | +{ | ||
34 | + [super didReceiveMemoryWarning]; | ||
35 | + // Dispose of any resources that can be recreated. | ||
36 | +} | ||
37 | + | ||
38 | +- (UIViewController *)popViewControllerAnimated:(BOOL)animated | ||
39 | +{ | ||
40 | + if(self.auxController == nil) | ||
41 | + { | ||
42 | + NSLog(@"[CustomNavigationController.m]: WARNING: No Auxiliar Controller assigned to Navigation controller"); | ||
43 | + return [super popViewControllerAnimated:animated]; | ||
44 | + } | ||
45 | + else | ||
46 | + { | ||
47 | + NSLog(@"[CustomNavigationController.m]: Navigation Stack has %d remaining levels",[[[self auxController] parentLayout] count]); | ||
48 | + if([[[self auxController] parentLayout] count] > 0) | ||
49 | + { | ||
50 | + NSLog(@"[CustomNavigationController.m]: Falling to previous navigation level"); | ||
51 | + [[self auxController] navBack]; | ||
52 | + } | ||
53 | + else | ||
54 | + { | ||
55 | + NSLog(@"[CustomNavigationController.m]: No more navigation levels in stack, falling to previous view"); | ||
56 | + self.auxController = nil; | ||
57 | + return [super popViewControllerAnimated:animated]; | ||
58 | + } | ||
59 | + } | ||
60 | + return nil; | ||
61 | +} | ||
62 | + | ||
63 | +/*- (void) setAuxController:(MenuTableViewController *)controller | ||
64 | +{ | ||
65 | + self.auxController = controller; | ||
66 | +}*/ | ||
67 | + | ||
68 | +/* | ||
69 | +#pragma mark - Navigation | ||
70 | + | ||
71 | +// In a storyboard-based application, you will often want to do a little preparation before navigation | ||
72 | +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender | ||
73 | +{ | ||
74 | + // Get the new view controller using [segue destinationViewController]. | ||
75 | + // Pass the selected object to the new view controller. | ||
76 | +} | ||
77 | +*/ | ||
78 | + | ||
79 | +@end |
DUREX tests/DUREX test.xcodeproj/project.pbxproj
@@ -22,6 +22,7 @@ | @@ -22,6 +22,7 @@ | ||
22 | F9469169193015EE006DACD3 /* icon_checkmark.png in Resources */ = {isa = PBXBuildFile; fileRef = F9469167193015EE006DACD3 /* icon_checkmark.png */; }; | 22 | F9469169193015EE006DACD3 /* icon_checkmark.png in Resources */ = {isa = PBXBuildFile; fileRef = F9469167193015EE006DACD3 /* icon_checkmark.png */; }; |
23 | F946916A193015EE006DACD3 /* icon_delete.png in Resources */ = {isa = PBXBuildFile; fileRef = F9469168193015EE006DACD3 /* icon_delete.png */; }; | 23 | F946916A193015EE006DACD3 /* icon_delete.png in Resources */ = {isa = PBXBuildFile; fileRef = F9469168193015EE006DACD3 /* icon_delete.png */; }; |
24 | F962A233192FCA8A00E4324A /* Stack.m in Sources */ = {isa = PBXBuildFile; fileRef = F962A232192FCA8A00E4324A /* Stack.m */; }; | 24 | F962A233192FCA8A00E4324A /* Stack.m in Sources */ = {isa = PBXBuildFile; fileRef = F962A232192FCA8A00E4324A /* Stack.m */; }; |
25 | + F97A7D701992DF1A0028036D /* CustomNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = F97A7D6F1992DF1A0028036D /* CustomNavigationController.m */; }; | ||
25 | F98356D6192E835F00EA6821 /* InitialViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F98356D5192E835F00EA6821 /* InitialViewController.m */; }; | 26 | F98356D6192E835F00EA6821 /* InitialViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F98356D5192E835F00EA6821 /* InitialViewController.m */; }; |
26 | F98356D8192E906600EA6821 /* bluetooth.png in Resources */ = {isa = PBXBuildFile; fileRef = F98356D7192E906600EA6821 /* bluetooth.png */; }; | 27 | F98356D8192E906600EA6821 /* bluetooth.png in Resources */ = {isa = PBXBuildFile; fileRef = F98356D7192E906600EA6821 /* bluetooth.png */; }; |
27 | F98356DB192EAFD400EA6821 /* CommunicationProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = F98356DA192EAFD400EA6821 /* CommunicationProtocol.m */; }; | 28 | F98356DB192EAFD400EA6821 /* CommunicationProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = F98356DA192EAFD400EA6821 /* CommunicationProtocol.m */; }; |
@@ -61,6 +62,8 @@ | @@ -61,6 +62,8 @@ | ||
61 | F9469168193015EE006DACD3 /* icon_delete.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_delete.png; sourceTree = SOURCE_ROOT; }; | 62 | F9469168193015EE006DACD3 /* icon_delete.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_delete.png; sourceTree = SOURCE_ROOT; }; |
62 | F962A231192FCA8A00E4324A /* Stack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Stack.h; sourceTree = SOURCE_ROOT; }; | 63 | F962A231192FCA8A00E4324A /* Stack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Stack.h; sourceTree = SOURCE_ROOT; }; |
63 | F962A232192FCA8A00E4324A /* Stack.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Stack.m; sourceTree = SOURCE_ROOT; }; | 64 | F962A232192FCA8A00E4324A /* Stack.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Stack.m; sourceTree = SOURCE_ROOT; }; |
65 | + F97A7D6E1992DF1A0028036D /* CustomNavigationController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomNavigationController.h; sourceTree = SOURCE_ROOT; }; | ||
66 | + F97A7D6F1992DF1A0028036D /* CustomNavigationController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomNavigationController.m; sourceTree = SOURCE_ROOT; }; | ||
64 | F98356D4192E835F00EA6821 /* InitialViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InitialViewController.h; sourceTree = SOURCE_ROOT; }; | 67 | F98356D4192E835F00EA6821 /* InitialViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InitialViewController.h; sourceTree = SOURCE_ROOT; }; |
65 | F98356D5192E835F00EA6821 /* InitialViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InitialViewController.m; sourceTree = SOURCE_ROOT; }; | 68 | F98356D5192E835F00EA6821 /* InitialViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InitialViewController.m; sourceTree = SOURCE_ROOT; }; |
66 | F98356D7192E906600EA6821 /* bluetooth.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bluetooth.png; sourceTree = SOURCE_ROOT; }; | 69 | F98356D7192E906600EA6821 /* bluetooth.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bluetooth.png; sourceTree = SOURCE_ROOT; }; |
@@ -130,6 +133,8 @@ | @@ -130,6 +133,8 @@ | ||
130 | 3471866618070D9300FA0FB2 /* FirstApp */ = { | 133 | 3471866618070D9300FA0FB2 /* FirstApp */ = { |
131 | isa = PBXGroup; | 134 | isa = PBXGroup; |
132 | children = ( | 135 | children = ( |
136 | + F97A7D6E1992DF1A0028036D /* CustomNavigationController.h */, | ||
137 | + F97A7D6F1992DF1A0028036D /* CustomNavigationController.m */, | ||
133 | 34AAB881189804FF0019860D /* MainStoryboard.storyboard */, | 138 | 34AAB881189804FF0019860D /* MainStoryboard.storyboard */, |
134 | 34AAB876189804FF0019860D /* DUREXAppDelegate.h */, | 139 | 34AAB876189804FF0019860D /* DUREXAppDelegate.h */, |
135 | 34AAB877189804FF0019860D /* DUREXAppDelegate.m */, | 140 | 34AAB877189804FF0019860D /* DUREXAppDelegate.m */, |
@@ -234,7 +239,7 @@ | @@ -234,7 +239,7 @@ | ||
234 | isa = PBXProject; | 239 | isa = PBXProject; |
235 | attributes = { | 240 | attributes = { |
236 | CLASSPREFIX = EM; | 241 | CLASSPREFIX = EM; |
237 | - LastUpgradeCheck = 0500; | 242 | + LastUpgradeCheck = 0510; |
238 | ORGANIZATIONNAME = Emmoco; | 243 | ORGANIZATIONNAME = Emmoco; |
239 | TargetAttributes = { | 244 | TargetAttributes = { |
240 | 3471867718070D9300FA0FB2 = { | 245 | 3471867718070D9300FA0FB2 = { |
@@ -295,6 +300,7 @@ | @@ -295,6 +300,7 @@ | ||
295 | 34AAB883189804FF0019860D /* DUREXAppDelegate.m in Sources */, | 300 | 34AAB883189804FF0019860D /* DUREXAppDelegate.m in Sources */, |
296 | F98356DB192EAFD400EA6821 /* CommunicationProtocol.m in Sources */, | 301 | F98356DB192EAFD400EA6821 /* CommunicationProtocol.m in Sources */, |
297 | F98356E1192EC84700EA6821 /* MenuTableViewController.m in Sources */, | 302 | F98356E1192EC84700EA6821 /* MenuTableViewController.m in Sources */, |
303 | + F97A7D701992DF1A0028036D /* CustomNavigationController.m in Sources */, | ||
298 | 34AAB889189804FF0019860D /* main.m in Sources */, | 304 | 34AAB889189804FF0019860D /* main.m in Sources */, |
299 | ); | 305 | ); |
300 | runOnlyForDeploymentPostprocessing = 0; | 306 | runOnlyForDeploymentPostprocessing = 0; |
@@ -332,7 +338,6 @@ | @@ -332,7 +338,6 @@ | ||
332 | isa = XCBuildConfiguration; | 338 | isa = XCBuildConfiguration; |
333 | buildSettings = { | 339 | buildSettings = { |
334 | ALWAYS_SEARCH_USER_PATHS = NO; | 340 | ALWAYS_SEARCH_USER_PATHS = NO; |
335 | - ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; | ||
336 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; | 341 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; |
337 | CLANG_CXX_LIBRARY = "libc++"; | 342 | CLANG_CXX_LIBRARY = "libc++"; |
338 | CLANG_ENABLE_MODULES = YES; | 343 | CLANG_ENABLE_MODULES = YES; |
@@ -345,6 +350,7 @@ | @@ -345,6 +350,7 @@ | ||
345 | CLANG_WARN_INT_CONVERSION = YES; | 350 | CLANG_WARN_INT_CONVERSION = YES; |
346 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | 351 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; |
347 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; | 352 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; |
353 | + CODE_SIGN_IDENTITY = "iPhone Developer"; | ||
348 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; | 354 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; |
349 | COPY_PHASE_STRIP = NO; | 355 | COPY_PHASE_STRIP = NO; |
350 | GCC_C_LANGUAGE_STANDARD = gnu99; | 356 | GCC_C_LANGUAGE_STANDARD = gnu99; |
@@ -361,9 +367,10 @@ | @@ -361,9 +367,10 @@ | ||
361 | GCC_WARN_UNINITIALIZED_AUTOS = YES; | 367 | GCC_WARN_UNINITIALIZED_AUTOS = YES; |
362 | GCC_WARN_UNUSED_FUNCTION = YES; | 368 | GCC_WARN_UNUSED_FUNCTION = YES; |
363 | GCC_WARN_UNUSED_VARIABLE = YES; | 369 | GCC_WARN_UNUSED_VARIABLE = YES; |
364 | - IPHONEOS_DEPLOYMENT_TARGET = 7.0; | 370 | + IPHONEOS_DEPLOYMENT_TARGET = 7.1; |
365 | ONLY_ACTIVE_ARCH = YES; | 371 | ONLY_ACTIVE_ARCH = YES; |
366 | SDKROOT = iphoneos; | 372 | SDKROOT = iphoneos; |
373 | + TARGETED_DEVICE_FAMILY = "1,2"; | ||
367 | }; | 374 | }; |
368 | name = Debug; | 375 | name = Debug; |
369 | }; | 376 | }; |
@@ -371,7 +378,6 @@ | @@ -371,7 +378,6 @@ | ||
371 | isa = XCBuildConfiguration; | 378 | isa = XCBuildConfiguration; |
372 | buildSettings = { | 379 | buildSettings = { |
373 | ALWAYS_SEARCH_USER_PATHS = NO; | 380 | ALWAYS_SEARCH_USER_PATHS = NO; |
374 | - ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; | ||
375 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; | 381 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; |
376 | CLANG_CXX_LIBRARY = "libc++"; | 382 | CLANG_CXX_LIBRARY = "libc++"; |
377 | CLANG_ENABLE_MODULES = YES; | 383 | CLANG_ENABLE_MODULES = YES; |
@@ -384,6 +390,7 @@ | @@ -384,6 +390,7 @@ | ||
384 | CLANG_WARN_INT_CONVERSION = YES; | 390 | CLANG_WARN_INT_CONVERSION = YES; |
385 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; | 391 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; |
386 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; | 392 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; |
393 | + CODE_SIGN_IDENTITY = "iPhone Developer"; | ||
387 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; | 394 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; |
388 | COPY_PHASE_STRIP = YES; | 395 | COPY_PHASE_STRIP = YES; |
389 | ENABLE_NS_ASSERTIONS = NO; | 396 | ENABLE_NS_ASSERTIONS = NO; |
@@ -394,8 +401,9 @@ | @@ -394,8 +401,9 @@ | ||
394 | GCC_WARN_UNINITIALIZED_AUTOS = YES; | 401 | GCC_WARN_UNINITIALIZED_AUTOS = YES; |
395 | GCC_WARN_UNUSED_FUNCTION = YES; | 402 | GCC_WARN_UNUSED_FUNCTION = YES; |
396 | GCC_WARN_UNUSED_VARIABLE = YES; | 403 | GCC_WARN_UNUSED_VARIABLE = YES; |
397 | - IPHONEOS_DEPLOYMENT_TARGET = 7.0; | 404 | + IPHONEOS_DEPLOYMENT_TARGET = 7.1; |
398 | SDKROOT = iphoneos; | 405 | SDKROOT = iphoneos; |
406 | + TARGETED_DEVICE_FAMILY = "1,2"; | ||
399 | VALIDATE_PRODUCT = YES; | 407 | VALIDATE_PRODUCT = YES; |
400 | }; | 408 | }; |
401 | name = Release; | 409 | name = Release; |
@@ -403,13 +411,12 @@ | @@ -403,13 +411,12 @@ | ||
403 | 3471868A18070D9300FA0FB2 /* Debug */ = { | 411 | 3471868A18070D9300FA0FB2 /* Debug */ = { |
404 | isa = XCBuildConfiguration; | 412 | isa = XCBuildConfiguration; |
405 | buildSettings = { | 413 | buildSettings = { |
406 | - ARCHS = "$(ARCHS_STANDARD)"; | ||
407 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | 414 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
408 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; | 415 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; |
409 | GCC_PRECOMPILE_PREFIX_HEADER = YES; | 416 | GCC_PRECOMPILE_PREFIX_HEADER = YES; |
410 | GCC_PREFIX_HEADER = "FirstAppExample/DUREX test-Prefix.pch"; | 417 | GCC_PREFIX_HEADER = "FirstAppExample/DUREX test-Prefix.pch"; |
411 | INFOPLIST_FILE = "FirstAppExample/DUREX test-Info.plist"; | 418 | INFOPLIST_FILE = "FirstAppExample/DUREX test-Info.plist"; |
412 | - IPHONEOS_DEPLOYMENT_TARGET = 6.0; | 419 | + IPHONEOS_DEPLOYMENT_TARGET = 7.0; |
413 | LIBRARY_SEARCH_PATHS = ( | 420 | LIBRARY_SEARCH_PATHS = ( |
414 | "$(inherited)", | 421 | "$(inherited)", |
415 | EmmocoMobileFramework/Framework, | 422 | EmmocoMobileFramework/Framework, |
@@ -423,13 +430,12 @@ | @@ -423,13 +430,12 @@ | ||
423 | 3471868B18070D9300FA0FB2 /* Release */ = { | 430 | 3471868B18070D9300FA0FB2 /* Release */ = { |
424 | isa = XCBuildConfiguration; | 431 | isa = XCBuildConfiguration; |
425 | buildSettings = { | 432 | buildSettings = { |
426 | - ARCHS = "$(ARCHS_STANDARD)"; | ||
427 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | 433 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
428 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; | 434 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; |
429 | GCC_PRECOMPILE_PREFIX_HEADER = YES; | 435 | GCC_PRECOMPILE_PREFIX_HEADER = YES; |
430 | GCC_PREFIX_HEADER = "FirstAppExample/DUREX test-Prefix.pch"; | 436 | GCC_PREFIX_HEADER = "FirstAppExample/DUREX test-Prefix.pch"; |
431 | INFOPLIST_FILE = "FirstAppExample/DUREX test-Info.plist"; | 437 | INFOPLIST_FILE = "FirstAppExample/DUREX test-Info.plist"; |
432 | - IPHONEOS_DEPLOYMENT_TARGET = 6.0; | 438 | + IPHONEOS_DEPLOYMENT_TARGET = 7.0; |
433 | LIBRARY_SEARCH_PATHS = ( | 439 | LIBRARY_SEARCH_PATHS = ( |
434 | "$(inherited)", | 440 | "$(inherited)", |
435 | EmmocoMobileFramework/Framework, | 441 | EmmocoMobileFramework/Framework, |
@@ -443,7 +449,6 @@ | @@ -443,7 +449,6 @@ | ||
443 | 3471868D18070D9300FA0FB2 /* Debug */ = { | 449 | 3471868D18070D9300FA0FB2 /* Debug */ = { |
444 | isa = XCBuildConfiguration; | 450 | isa = XCBuildConfiguration; |
445 | buildSettings = { | 451 | buildSettings = { |
446 | - ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; | ||
447 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TestAppExample.app/TestAppExample"; | 452 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TestAppExample.app/TestAppExample"; |
448 | FRAMEWORK_SEARCH_PATHS = ( | 453 | FRAMEWORK_SEARCH_PATHS = ( |
449 | "$(SDKROOT)/Developer/Library/Frameworks", | 454 | "$(SDKROOT)/Developer/Library/Frameworks", |
@@ -466,7 +471,6 @@ | @@ -466,7 +471,6 @@ | ||
466 | 3471868E18070D9300FA0FB2 /* Release */ = { | 471 | 3471868E18070D9300FA0FB2 /* Release */ = { |
467 | isa = XCBuildConfiguration; | 472 | isa = XCBuildConfiguration; |
468 | buildSettings = { | 473 | buildSettings = { |
469 | - ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; | ||
470 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TestAppExample.app/TestAppExample"; | 474 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TestAppExample.app/TestAppExample"; |
471 | FRAMEWORK_SEARCH_PATHS = ( | 475 | FRAMEWORK_SEARCH_PATHS = ( |
472 | "$(SDKROOT)/Developer/Library/Frameworks", | 476 | "$(SDKROOT)/Developer/Library/Frameworks", |
DUREX tests/DUREX test.xcodeproj/project.xcworkspace/xcuserdata/imanol.xcuserdatad/UserInterfaceState.xcuserstate
No preview for this file type
DUREX tests/DUREX test.xcodeproj/xcuserdata/imanol.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
@@ -2,4 +2,38 @@ | @@ -2,4 +2,38 @@ | ||
2 | <Bucket | 2 | <Bucket |
3 | type = "1" | 3 | type = "1" |
4 | version = "2.0"> | 4 | version = "2.0"> |
5 | + <Breakpoints> | ||
6 | + <BreakpointProxy | ||
7 | + BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> | ||
8 | + <BreakpointContent | ||
9 | + shouldBeEnabled = "No" | ||
10 | + ignoreCount = "0" | ||
11 | + continueAfterRunningActions = "No" | ||
12 | + filePath = "CustomNavigationController.m" | ||
13 | + timestampString = "429064161.848095" | ||
14 | + startingColumnNumber = "9223372036854775807" | ||
15 | + endingColumnNumber = "9223372036854775807" | ||
16 | + startingLineNumber = "15" | ||
17 | + endingLineNumber = "15" | ||
18 | + landmarkName = "@implementation CustomNavigationController" | ||
19 | + landmarkType = "3"> | ||
20 | + </BreakpointContent> | ||
21 | + </BreakpointProxy> | ||
22 | + <BreakpointProxy | ||
23 | + BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> | ||
24 | + <BreakpointContent | ||
25 | + shouldBeEnabled = "No" | ||
26 | + ignoreCount = "0" | ||
27 | + continueAfterRunningActions = "No" | ||
28 | + filePath = "MenuTableViewController.m" | ||
29 | + timestampString = "429105816.932528" | ||
30 | + startingColumnNumber = "9223372036854775807" | ||
31 | + endingColumnNumber = "9223372036854775807" | ||
32 | + startingLineNumber = "144" | ||
33 | + endingLineNumber = "144" | ||
34 | + landmarkName = "-viewDidLoad" | ||
35 | + landmarkType = "5"> | ||
36 | + </BreakpointContent> | ||
37 | + </BreakpointProxy> | ||
38 | + </Breakpoints> | ||
5 | </Bucket> | 39 | </Bucket> |
DUREX tests/FirstAppExample/DUREXAppDelegate.h
@@ -7,11 +7,12 @@ | @@ -7,11 +7,12 @@ | ||
7 | // | 7 | // |
8 | 8 | ||
9 | #import <UIKit/UIKit.h> | 9 | #import <UIKit/UIKit.h> |
10 | +#import "CustomNavigationController.h" | ||
10 | 11 | ||
11 | @interface DUREXAppDelegate : UIResponder <UIApplicationDelegate> | 12 | @interface DUREXAppDelegate : UIResponder <UIApplicationDelegate> |
12 | 13 | ||
13 | @property (strong, nonatomic) UIWindow *window; | 14 | @property (strong, nonatomic) UIWindow *window; |
14 | -@property (nonatomic, strong) IBOutlet UINavigationController *navController; | 15 | +@property (nonatomic, strong) IBOutlet CustomNavigationController *navController; |
15 | 16 | ||
16 | 17 | ||
17 | 18 |
DUREX tests/FirstAppExample/DUREXAppDelegate.m
@@ -20,7 +20,7 @@ | @@ -20,7 +20,7 @@ | ||
20 | 20 | ||
21 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions | 21 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions |
22 | { | 22 | { |
23 | - UINavigationController *navController = (UINavigationController *)[[self window] rootViewController]; | 23 | + CustomNavigationController *navController = (CustomNavigationController *)[[self window] rootViewController]; |
24 | [self setNavController:navController]; | 24 | [self setNavController:navController]; |
25 | [[self navController] setDelegate:self]; | 25 | [[self navController] setDelegate:self]; |
26 | 26 |
DUREX tests/FirstAppExample/MainStoryboard.storyboard
1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
2 | <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="5056" systemVersion="12F45" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="kWw-Rk-wD6"> | 2 | <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="5056" systemVersion="12F45" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="kWw-Rk-wD6"> |
3 | <dependencies> | 3 | <dependencies> |
4 | - <deployment defaultVersion="1536" identifier="iOS"/> | 4 | + <deployment defaultVersion="1792" identifier="iOS"/> |
5 | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/> | 5 | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/> |
6 | </dependencies> | 6 | </dependencies> |
7 | <scenes> | 7 | <scenes> |
@@ -116,10 +116,10 @@ | @@ -116,10 +116,10 @@ | ||
116 | </objects> | 116 | </objects> |
117 | <point key="canvasLocation" x="834" y="-9"/> | 117 | <point key="canvasLocation" x="834" y="-9"/> |
118 | </scene> | 118 | </scene> |
119 | - <!--Navigation Controller--> | 119 | + <!--Custom Navigation Controller--> |
120 | <scene sceneID="Ker-Z3-hzQ"> | 120 | <scene sceneID="Ker-Z3-hzQ"> |
121 | <objects> | 121 | <objects> |
122 | - <navigationController definesPresentationContext="YES" id="kWw-Rk-wD6" sceneMemberID="viewController"> | 122 | + <navigationController definesPresentationContext="YES" id="kWw-Rk-wD6" customClass="CustomNavigationController" sceneMemberID="viewController"> |
123 | <navigationBar key="navigationBar" contentMode="scaleToFill" id="fTx-P1-hLO"> | 123 | <navigationBar key="navigationBar" contentMode="scaleToFill" id="fTx-P1-hLO"> |
124 | <autoresizingMask key="autoresizingMask"/> | 124 | <autoresizingMask key="autoresizingMask"/> |
125 | </navigationBar> | 125 | </navigationBar> |
DUREX tests/MenuTableViewController.h
DUREX tests/MenuTableViewController.m
@@ -7,6 +7,7 @@ | @@ -7,6 +7,7 @@ | ||
7 | // | 7 | // |
8 | 8 | ||
9 | #import "MenuTableViewController.h" | 9 | #import "MenuTableViewController.h" |
10 | +#import "DUREXAppDelegate.h" | ||
10 | 11 | ||
11 | @interface MenuTableViewController () | 12 | @interface MenuTableViewController () |
12 | { | 13 | { |
@@ -71,9 +72,12 @@ | @@ -71,9 +72,12 @@ | ||
71 | [self setCellIdentifiers:[[NSArray alloc] initWithObjects:CELL_IDENTIFIERS, nil]]; | 72 | [self setCellIdentifiers:[[NSArray alloc] initWithObjects:CELL_IDENTIFIERS, nil]]; |
72 | } | 73 | } |
73 | 74 | ||
74 | -- (void) changeNavLevel: (uint8_t) level | 75 | +- (void) changeNavLevel: (uint8_t) level : (BOOL) push |
75 | { | 76 | { |
76 | - [[self parentLayout] push: [NSNumber numberWithUnsignedChar:level]]; | 77 | + if(push) |
78 | + { | ||
79 | + [[self parentLayout] push: [NSNumber numberWithUnsignedChar:self.currentNavLevel]]; | ||
80 | + } | ||
77 | [self setCurrentNavLevel:level]; | 81 | [self setCurrentNavLevel:level]; |
78 | [self setCurrentCellIdentifier:[[self cellIdentifiers] objectAtIndex:[self currentNavLevel]]]; | 82 | [self setCurrentCellIdentifier:[[self cellIdentifiers] objectAtIndex:[self currentNavLevel]]]; |
79 | if([self currentNavLevel] == MAINTENANCE) | 83 | if([self currentNavLevel] == MAINTENANCE) |
@@ -81,6 +85,7 @@ | @@ -81,6 +85,7 @@ | ||
81 | [self setCurrentElements:[self maintenanceElements]]; | 85 | [self setCurrentElements:[self maintenanceElements]]; |
82 | [self setCurrentStructure:[self maintenanceStructure]]; | 86 | [self setCurrentStructure:[self maintenanceStructure]]; |
83 | [self setCurrentHeaders:[self maintenanceHeaders]]; | 87 | [self setCurrentHeaders:[self maintenanceHeaders]]; |
88 | + | ||
84 | } | 89 | } |
85 | //AND SO ON... | 90 | //AND SO ON... |
86 | else | 91 | else |
@@ -94,6 +99,13 @@ | @@ -94,6 +99,13 @@ | ||
94 | NSIndexSet *sections = [NSIndexSet indexSetWithIndexesInRange:range]; | 99 | NSIndexSet *sections = [NSIndexSet indexSetWithIndexesInRange:range]; |
95 | [[self tableView] reloadSections:sections withRowAnimation:UITableViewRowAnimationAutomatic]; | 100 | [[self tableView] reloadSections:sections withRowAnimation:UITableViewRowAnimationAutomatic]; |
96 | } | 101 | } |
102 | + | ||
103 | +- (void) navBack | ||
104 | +{ | ||
105 | + NSNumber *prevLevel = [[self parentLayout] pop]; | ||
106 | + self.currentNavLevel = prevLevel.intValue; | ||
107 | + [self changeNavLevel: prevLevel.intValue : FALSE]; | ||
108 | +} | ||
97 | 109 | ||
98 | - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section | 110 | - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section |
99 | { | 111 | { |
@@ -128,7 +140,11 @@ | @@ -128,7 +140,11 @@ | ||
128 | 140 | ||
129 | //Set navigation level | 141 | //Set navigation level |
130 | [self initializeMenuEntries]; | 142 | [self initializeMenuEntries]; |
131 | - [self changeNavLevel:MENU]; | 143 | + self.currentNavLevel = 255; |
144 | + [self changeNavLevel:MENU:FALSE]; | ||
145 | + DUREXAppDelegate *appDelegate = (DUREXAppDelegate *)[[UIApplication sharedApplication] delegate]; | ||
146 | + CustomNavigationController *navController = [appDelegate navController]; | ||
147 | + navController.auxController = self; | ||
132 | 148 | ||
133 | // Uncomment the following line to preserve selection between presentations. | 149 | // Uncomment the following line to preserve selection between presentations. |
134 | // self.clearsSelectionOnViewWillAppear = NO; | 150 | // self.clearsSelectionOnViewWillAppear = NO; |
@@ -162,13 +178,13 @@ | @@ -162,13 +178,13 @@ | ||
162 | 178 | ||
163 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath | 179 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath |
164 | { | 180 | { |
165 | - NSLog(@"Section: %d Row: %d",[indexPath section],[indexPath row]); | 181 | + NSLog(@"[MenuTableViewController.m]: Section: %d Row: %d",[indexPath section],[indexPath row]); |
166 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; | 182 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; |
167 | NSString *cellName = [[[[self tableView] cellForRowAtIndexPath:indexPath]textLabel]text]; | 183 | NSString *cellName = [[[[self tableView] cellForRowAtIndexPath:indexPath]textLabel]text]; |
168 | if([cellName isEqualToString:@"Maintenance"]) | 184 | if([cellName isEqualToString:@"Maintenance"]) |
169 | { | 185 | { |
170 | - NSLog(@"Changing to navLevel: MAINTENANCE"); | ||
171 | - [self changeNavLevel:MAINTENANCE]; | 186 | + NSLog(@"[MenuTableViewController.m]: Changing to navLevel: MAINTENANCE"); |
187 | + [self changeNavLevel:MAINTENANCE:TRUE]; | ||
172 | } | 188 | } |
173 | 189 | ||
174 | 190 | ||
@@ -188,15 +204,15 @@ | @@ -188,15 +204,15 @@ | ||
188 | 204 | ||
189 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | 205 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath |
190 | { | 206 | { |
191 | - NSLog(@"navLevel is %d",[self currentNavLevel]); | 207 | + NSLog(@"[MenuTableViewController.m]: navLevel is %d",[self currentNavLevel]); |
192 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:[self currentCellIdentifier] forIndexPath:indexPath]; | 208 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:[self currentCellIdentifier] forIndexPath:indexPath]; |
193 | 209 | ||
194 | if (cell == nil) | 210 | if (cell == nil) |
195 | { | 211 | { |
196 | - NSLog(@"Initializing cell"); | 212 | + NSLog(@"[MenuTableViewController.m]: Initializing cell"); |
197 | if([self currentNavLevel] == MAINTENANCE) | 213 | if([self currentNavLevel] == MAINTENANCE) |
198 | { | 214 | { |
199 | - NSLog(@"Dispatching Maintenance-type cell"); | 215 | + NSLog(@"[MenuTableViewController.m]: Dispatching Maintenance-type cell"); |
200 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:[self currentCellIdentifier]]; | 216 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:[self currentCellIdentifier]]; |
201 | } | 217 | } |
202 | else | 218 | else |
@@ -215,7 +231,7 @@ | @@ -215,7 +231,7 @@ | ||
215 | [[cell textLabel] setText:[[self currentElements] objectAtIndex:[indexPath row]+offset]]; | 231 | [[cell textLabel] setText:[[self currentElements] objectAtIndex:[indexPath row]+offset]]; |
216 | if([self currentNavLevel] == MAINTENANCE) | 232 | if([self currentNavLevel] == MAINTENANCE) |
217 | { | 233 | { |
218 | - NSLog(@"Customizing cell for navLevel MAINTENANCE"); | 234 | + NSLog(@"[MenuTableViewController.m]: Customizing cell for navLevel MAINTENANCE"); |
219 | [[cell detailTextLabel] setText:@"VALUE"]; | 235 | [[cell detailTextLabel] setText:@"VALUE"]; |
220 | [cell setAccessoryView: [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_checkmark"]]]; | 236 | [cell setAccessoryView: [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_checkmark"]]]; |
221 | if( [[[cell textLabel] text] isEqualToString:@"5€ Notes"]) | 237 | if( [[[cell textLabel] text] isEqualToString:@"5€ Notes"]) |
DUREX tests/Stack.m
@@ -27,7 +27,6 @@ | @@ -27,7 +27,6 @@ | ||
27 | - (void) push: (id) element | 27 | - (void) push: (id) element |
28 | { | 28 | { |
29 | [[self dataArray] addObject:element]; | 29 | [[self dataArray] addObject:element]; |
30 | - printf("%d elements in array\n",[self count]); | ||
31 | } | 30 | } |
32 | - (id) pop | 31 | - (id) pop |
33 | { | 32 | { |
@@ -42,7 +41,7 @@ | @@ -42,7 +41,7 @@ | ||
42 | } | 41 | } |
43 | - (void) clear | 42 | - (void) clear |
44 | { | 43 | { |
45 | - | 44 | + [[self dataArray] removeAllObjects]; |
46 | } | 45 | } |
47 | 46 | ||
48 | @end | 47 | @end |