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 | 53 | } |
54 | 54 | onFail:^(NSError *error) |
55 | 55 | { |
56 | - NSLog(@"%@",error); | |
56 | + NSLog(@"[CommunicationProtocol.m]: %@",error); | |
57 | 57 | numPackets = 0; |
58 | 58 | }]; |
59 | 59 | if(numPackets) |
... | ... | @@ -66,7 +66,7 @@ |
66 | 66 | } |
67 | 67 | onFail:^(NSError *error) |
68 | 68 | { |
69 | - NSLog(@"%@",error); | |
69 | + NSLog(@"[CommunicationProtocol.m]: %@",error); | |
70 | 70 | numBytes = 0; |
71 | 71 | }]; |
72 | 72 | if(numBytes) |
... | ... | @@ -77,7 +77,7 @@ |
77 | 77 | } |
78 | 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 | 89 | } |
90 | 90 | onFail:^(NSError *error) |
91 | 91 | { |
92 | - NSLog(@"%@",error); | |
92 | + NSLog(@"[CommunicationProtocol.m]: %@",error); | |
93 | 93 | } |
94 | 94 | ]; |
95 | 95 | return message; |
... | ... | @@ -106,7 +106,7 @@ |
106 | 106 | } |
107 | 107 | onFail:^(NSError *error) |
108 | 108 | { |
109 | - NSLog(@"%@",error); | |
109 | + NSLog(@"[CommunicationProtocol.m]: %@",error); | |
110 | 110 | status = FALSE; |
111 | 111 | } |
112 | 112 | ]; |
... | ... | @@ -135,7 +135,7 @@ |
135 | 135 | } |
136 | 136 | onFail:^(NSError *error) |
137 | 137 | { |
138 | - NSLog(@"%@",error); | |
138 | + NSLog(@"[CommunicationProtocol.m]: %@",error); | |
139 | 139 | status = FALSE; |
140 | 140 | } |
141 | 141 | ]; |
... | ... | @@ -149,7 +149,7 @@ |
149 | 149 | } |
150 | 150 | onFail:^(NSError *error) |
151 | 151 | { |
152 | - NSLog(@"%@",error); | |
152 | + NSLog(@"[CommunicationProtocol.m]: %@",error); | |
153 | 153 | status = FALSE; |
154 | 154 | } |
155 | 155 | ]; |
... | ... | @@ -161,7 +161,7 @@ |
161 | 161 | } |
162 | 162 | onFail:^(NSError *error) |
163 | 163 | { |
164 | - NSLog(@"%@",error); | |
164 | + NSLog(@"[CommunicationProtocol.m]: %@",error); | |
165 | 165 | status = FALSE; |
166 | 166 | } |
167 | 167 | ]; | ... | ... |
DUREX Vendor Control/DUREX Vendor Control.xcodeproj/project.pbxproj
... | ... | @@ -272,7 +272,7 @@ |
272 | 272 | isa = PBXProject; |
273 | 273 | attributes = { |
274 | 274 | CLASSPREFIX = EM; |
275 | - LastUpgradeCheck = 0500; | |
275 | + LastUpgradeCheck = 0510; | |
276 | 276 | ORGANIZATIONNAME = Emmoco; |
277 | 277 | TargetAttributes = { |
278 | 278 | 3471867718070D9300FA0FB2 = { |
... | ... | @@ -369,7 +369,6 @@ |
369 | 369 | isa = XCBuildConfiguration; |
370 | 370 | buildSettings = { |
371 | 371 | ALWAYS_SEARCH_USER_PATHS = NO; |
372 | - ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; | |
373 | 372 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; |
374 | 373 | CLANG_CXX_LIBRARY = "libc++"; |
375 | 374 | CLANG_ENABLE_MODULES = YES; |
... | ... | @@ -409,7 +408,6 @@ |
409 | 408 | isa = XCBuildConfiguration; |
410 | 409 | buildSettings = { |
411 | 410 | ALWAYS_SEARCH_USER_PATHS = NO; |
412 | - ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; | |
413 | 411 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; |
414 | 412 | CLANG_CXX_LIBRARY = "libc++"; |
415 | 413 | CLANG_ENABLE_MODULES = YES; |
... | ... | @@ -442,7 +440,6 @@ |
442 | 440 | 3471868A18070D9300FA0FB2 /* Debug */ = { |
443 | 441 | isa = XCBuildConfiguration; |
444 | 442 | buildSettings = { |
445 | - ARCHS = "$(ARCHS_STANDARD)"; | |
446 | 443 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
447 | 444 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; |
448 | 445 | GCC_PRECOMPILE_PREFIX_HEADER = YES; |
... | ... | @@ -461,7 +458,6 @@ |
461 | 458 | 3471868B18070D9300FA0FB2 /* Release */ = { |
462 | 459 | isa = XCBuildConfiguration; |
463 | 460 | buildSettings = { |
464 | - ARCHS = "$(ARCHS_STANDARD)"; | |
465 | 461 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
466 | 462 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; |
467 | 463 | GCC_PRECOMPILE_PREFIX_HEADER = YES; |
... | ... | @@ -480,7 +476,6 @@ |
480 | 476 | 3471868D18070D9300FA0FB2 /* Debug */ = { |
481 | 477 | isa = XCBuildConfiguration; |
482 | 478 | buildSettings = { |
483 | - ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; | |
484 | 479 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TestAppExample.app/TestAppExample"; |
485 | 480 | FRAMEWORK_SEARCH_PATHS = ( |
486 | 481 | "$(SDKROOT)/Developer/Library/Frameworks", |
... | ... | @@ -503,7 +498,6 @@ |
503 | 498 | 3471868E18070D9300FA0FB2 /* Release */ = { |
504 | 499 | isa = XCBuildConfiguration; |
505 | 500 | buildSettings = { |
506 | - ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; | |
507 | 501 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TestAppExample.app/TestAppExample"; |
508 | 502 | FRAMEWORK_SEARCH_PATHS = ( |
509 | 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 | 2 | <Bucket |
3 | 3 | type = "1" |
4 | 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 | 5 | </Bucket> | ... | ... |
DUREX Vendor Control/MenuTableViewController.h
DUREX Vendor Control/MenuTableViewController.m
... | ... | @@ -71,9 +71,12 @@ |
71 | 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 | 80 | [self setCurrentNavLevel:level]; |
78 | 81 | [self setCurrentCellIdentifier:[[self cellIdentifiers] objectAtIndex:[self currentNavLevel]]]; |
79 | 82 | if([self currentNavLevel] == MAINTENANCE) |
... | ... | @@ -95,6 +98,13 @@ |
95 | 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 | 108 | - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section |
99 | 109 | { |
100 | 110 | NSString *title = @""; |
... | ... | @@ -136,7 +146,13 @@ |
136 | 146 | |
137 | 147 | //Set navigation level |
138 | 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 | 157 | // Uncomment the following line to preserve selection between presentations. |
142 | 158 | // self.clearsSelectionOnViewWillAppear = NO; |
... | ... | @@ -198,8 +214,9 @@ |
198 | 214 | NSString *cellName = [[[[self tableView] cellForRowAtIndexPath:indexPath]textLabel]text]; |
199 | 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 | 234 | |
218 | 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 | 238 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:[self currentCellIdentifier] forIndexPath:indexPath]; |
222 | 239 | |
223 | 240 | if (cell == nil) |
224 | 241 | { |
225 | - NSLog(@"Initializing cell"); | |
242 | + NSLog(@"[MenuTableViewController.m]: Initializing cell"); | |
226 | 243 | if([self currentNavLevel] == MAINTENANCE) |
227 | 244 | { |
228 | - NSLog(@"Dispatching Maintenance-type cell"); | |
245 | + NSLog(@"[MenuTableViewController.m]: Dispatching Maintenance-type cell"); | |
229 | 246 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:[self currentCellIdentifier]]; |
230 | 247 | } |
231 | 248 | else |
... | ... | @@ -244,7 +261,7 @@ |
244 | 261 | [[cell textLabel] setText:[[self currentElements] objectAtIndex:[indexPath row]+offset]]; |
245 | 262 | if([self currentNavLevel] == MAINTENANCE) |
246 | 263 | { |
247 | - NSLog(@"Customizing cell for navLevel MAINTENANCE"); | |
264 | + NSLog(@"[MenuTableViewController.m]: Customizing cell for navLevel MAINTENANCE"); | |
248 | 265 | [[cell detailTextLabel] setText:@"VALUE"]; |
249 | 266 | [cell setAccessoryView: [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_checkmark"]]]; |
250 | 267 | if( [[[cell textLabel] text] isEqualToString:@"5€ Notes"]) | ... | ... |
DUREX Vendor Control/Stack.m
... | ... | @@ -27,7 +27,6 @@ |
27 | 27 | - (void) push: (id) element |
28 | 28 | { |
29 | 29 | [[self dataArray] addObject:element]; |
30 | - printf("%ld elements in array\n",(long)[self count]); | |
31 | 30 | } |
32 | 31 | - (id) pop |
33 | 32 | { |
... | ... | @@ -42,7 +41,7 @@ |
42 | 41 | } |
43 | 42 | - (void) clear |
44 | 43 | { |
45 | - | |
44 | + [[self dataArray] removeAllObjects]; | |
46 | 45 | } |
47 | 46 | |
48 | 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 | 22 | F9469169193015EE006DACD3 /* icon_checkmark.png in Resources */ = {isa = PBXBuildFile; fileRef = F9469167193015EE006DACD3 /* icon_checkmark.png */; }; |
23 | 23 | F946916A193015EE006DACD3 /* icon_delete.png in Resources */ = {isa = PBXBuildFile; fileRef = F9469168193015EE006DACD3 /* icon_delete.png */; }; |
24 | 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 | 26 | F98356D6192E835F00EA6821 /* InitialViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F98356D5192E835F00EA6821 /* InitialViewController.m */; }; |
26 | 27 | F98356D8192E906600EA6821 /* bluetooth.png in Resources */ = {isa = PBXBuildFile; fileRef = F98356D7192E906600EA6821 /* bluetooth.png */; }; |
27 | 28 | F98356DB192EAFD400EA6821 /* CommunicationProtocol.m in Sources */ = {isa = PBXBuildFile; fileRef = F98356DA192EAFD400EA6821 /* CommunicationProtocol.m */; }; |
... | ... | @@ -61,6 +62,8 @@ |
61 | 62 | F9469168193015EE006DACD3 /* icon_delete.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icon_delete.png; sourceTree = SOURCE_ROOT; }; |
62 | 63 | F962A231192FCA8A00E4324A /* Stack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Stack.h; sourceTree = SOURCE_ROOT; }; |
63 | 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 | 67 | F98356D4192E835F00EA6821 /* InitialViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InitialViewController.h; sourceTree = SOURCE_ROOT; }; |
65 | 68 | F98356D5192E835F00EA6821 /* InitialViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = InitialViewController.m; sourceTree = SOURCE_ROOT; }; |
66 | 69 | F98356D7192E906600EA6821 /* bluetooth.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bluetooth.png; sourceTree = SOURCE_ROOT; }; |
... | ... | @@ -130,6 +133,8 @@ |
130 | 133 | 3471866618070D9300FA0FB2 /* FirstApp */ = { |
131 | 134 | isa = PBXGroup; |
132 | 135 | children = ( |
136 | + F97A7D6E1992DF1A0028036D /* CustomNavigationController.h */, | |
137 | + F97A7D6F1992DF1A0028036D /* CustomNavigationController.m */, | |
133 | 138 | 34AAB881189804FF0019860D /* MainStoryboard.storyboard */, |
134 | 139 | 34AAB876189804FF0019860D /* DUREXAppDelegate.h */, |
135 | 140 | 34AAB877189804FF0019860D /* DUREXAppDelegate.m */, |
... | ... | @@ -234,7 +239,7 @@ |
234 | 239 | isa = PBXProject; |
235 | 240 | attributes = { |
236 | 241 | CLASSPREFIX = EM; |
237 | - LastUpgradeCheck = 0500; | |
242 | + LastUpgradeCheck = 0510; | |
238 | 243 | ORGANIZATIONNAME = Emmoco; |
239 | 244 | TargetAttributes = { |
240 | 245 | 3471867718070D9300FA0FB2 = { |
... | ... | @@ -295,6 +300,7 @@ |
295 | 300 | 34AAB883189804FF0019860D /* DUREXAppDelegate.m in Sources */, |
296 | 301 | F98356DB192EAFD400EA6821 /* CommunicationProtocol.m in Sources */, |
297 | 302 | F98356E1192EC84700EA6821 /* MenuTableViewController.m in Sources */, |
303 | + F97A7D701992DF1A0028036D /* CustomNavigationController.m in Sources */, | |
298 | 304 | 34AAB889189804FF0019860D /* main.m in Sources */, |
299 | 305 | ); |
300 | 306 | runOnlyForDeploymentPostprocessing = 0; |
... | ... | @@ -332,7 +338,6 @@ |
332 | 338 | isa = XCBuildConfiguration; |
333 | 339 | buildSettings = { |
334 | 340 | ALWAYS_SEARCH_USER_PATHS = NO; |
335 | - ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; | |
336 | 341 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; |
337 | 342 | CLANG_CXX_LIBRARY = "libc++"; |
338 | 343 | CLANG_ENABLE_MODULES = YES; |
... | ... | @@ -345,6 +350,7 @@ |
345 | 350 | CLANG_WARN_INT_CONVERSION = YES; |
346 | 351 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; |
347 | 352 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; |
353 | + CODE_SIGN_IDENTITY = "iPhone Developer"; | |
348 | 354 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; |
349 | 355 | COPY_PHASE_STRIP = NO; |
350 | 356 | GCC_C_LANGUAGE_STANDARD = gnu99; |
... | ... | @@ -361,9 +367,10 @@ |
361 | 367 | GCC_WARN_UNINITIALIZED_AUTOS = YES; |
362 | 368 | GCC_WARN_UNUSED_FUNCTION = YES; |
363 | 369 | GCC_WARN_UNUSED_VARIABLE = YES; |
364 | - IPHONEOS_DEPLOYMENT_TARGET = 7.0; | |
370 | + IPHONEOS_DEPLOYMENT_TARGET = 7.1; | |
365 | 371 | ONLY_ACTIVE_ARCH = YES; |
366 | 372 | SDKROOT = iphoneos; |
373 | + TARGETED_DEVICE_FAMILY = "1,2"; | |
367 | 374 | }; |
368 | 375 | name = Debug; |
369 | 376 | }; |
... | ... | @@ -371,7 +378,6 @@ |
371 | 378 | isa = XCBuildConfiguration; |
372 | 379 | buildSettings = { |
373 | 380 | ALWAYS_SEARCH_USER_PATHS = NO; |
374 | - ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; | |
375 | 381 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; |
376 | 382 | CLANG_CXX_LIBRARY = "libc++"; |
377 | 383 | CLANG_ENABLE_MODULES = YES; |
... | ... | @@ -384,6 +390,7 @@ |
384 | 390 | CLANG_WARN_INT_CONVERSION = YES; |
385 | 391 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; |
386 | 392 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; |
393 | + CODE_SIGN_IDENTITY = "iPhone Developer"; | |
387 | 394 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; |
388 | 395 | COPY_PHASE_STRIP = YES; |
389 | 396 | ENABLE_NS_ASSERTIONS = NO; |
... | ... | @@ -394,8 +401,9 @@ |
394 | 401 | GCC_WARN_UNINITIALIZED_AUTOS = YES; |
395 | 402 | GCC_WARN_UNUSED_FUNCTION = YES; |
396 | 403 | GCC_WARN_UNUSED_VARIABLE = YES; |
397 | - IPHONEOS_DEPLOYMENT_TARGET = 7.0; | |
404 | + IPHONEOS_DEPLOYMENT_TARGET = 7.1; | |
398 | 405 | SDKROOT = iphoneos; |
406 | + TARGETED_DEVICE_FAMILY = "1,2"; | |
399 | 407 | VALIDATE_PRODUCT = YES; |
400 | 408 | }; |
401 | 409 | name = Release; |
... | ... | @@ -403,13 +411,12 @@ |
403 | 411 | 3471868A18070D9300FA0FB2 /* Debug */ = { |
404 | 412 | isa = XCBuildConfiguration; |
405 | 413 | buildSettings = { |
406 | - ARCHS = "$(ARCHS_STANDARD)"; | |
407 | 414 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
408 | 415 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; |
409 | 416 | GCC_PRECOMPILE_PREFIX_HEADER = YES; |
410 | 417 | GCC_PREFIX_HEADER = "FirstAppExample/DUREX test-Prefix.pch"; |
411 | 418 | INFOPLIST_FILE = "FirstAppExample/DUREX test-Info.plist"; |
412 | - IPHONEOS_DEPLOYMENT_TARGET = 6.0; | |
419 | + IPHONEOS_DEPLOYMENT_TARGET = 7.0; | |
413 | 420 | LIBRARY_SEARCH_PATHS = ( |
414 | 421 | "$(inherited)", |
415 | 422 | EmmocoMobileFramework/Framework, |
... | ... | @@ -423,13 +430,12 @@ |
423 | 430 | 3471868B18070D9300FA0FB2 /* Release */ = { |
424 | 431 | isa = XCBuildConfiguration; |
425 | 432 | buildSettings = { |
426 | - ARCHS = "$(ARCHS_STANDARD)"; | |
427 | 433 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; |
428 | 434 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; |
429 | 435 | GCC_PRECOMPILE_PREFIX_HEADER = YES; |
430 | 436 | GCC_PREFIX_HEADER = "FirstAppExample/DUREX test-Prefix.pch"; |
431 | 437 | INFOPLIST_FILE = "FirstAppExample/DUREX test-Info.plist"; |
432 | - IPHONEOS_DEPLOYMENT_TARGET = 6.0; | |
438 | + IPHONEOS_DEPLOYMENT_TARGET = 7.0; | |
433 | 439 | LIBRARY_SEARCH_PATHS = ( |
434 | 440 | "$(inherited)", |
435 | 441 | EmmocoMobileFramework/Framework, |
... | ... | @@ -443,7 +449,6 @@ |
443 | 449 | 3471868D18070D9300FA0FB2 /* Debug */ = { |
444 | 450 | isa = XCBuildConfiguration; |
445 | 451 | buildSettings = { |
446 | - ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; | |
447 | 452 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TestAppExample.app/TestAppExample"; |
448 | 453 | FRAMEWORK_SEARCH_PATHS = ( |
449 | 454 | "$(SDKROOT)/Developer/Library/Frameworks", |
... | ... | @@ -466,7 +471,6 @@ |
466 | 471 | 3471868E18070D9300FA0FB2 /* Release */ = { |
467 | 472 | isa = XCBuildConfiguration; |
468 | 473 | buildSettings = { |
469 | - ARCHS = "$(ARCHS_STANDARD_INCLUDING_64_BIT)"; | |
470 | 474 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/TestAppExample.app/TestAppExample"; |
471 | 475 | FRAMEWORK_SEARCH_PATHS = ( |
472 | 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 | 2 | <Bucket |
3 | 3 | type = "1" |
4 | 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 | 39 | </Bucket> | ... | ... |
DUREX tests/FirstAppExample/DUREXAppDelegate.h
... | ... | @@ -7,11 +7,12 @@ |
7 | 7 | // |
8 | 8 | |
9 | 9 | #import <UIKit/UIKit.h> |
10 | +#import "CustomNavigationController.h" | |
10 | 11 | |
11 | 12 | @interface DUREXAppDelegate : UIResponder <UIApplicationDelegate> |
12 | 13 | |
13 | 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 | 20 | |
21 | 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 | 24 | [self setNavController:navController]; |
25 | 25 | [[self navController] setDelegate:self]; |
26 | 26 | ... | ... |
DUREX tests/FirstAppExample/MainStoryboard.storyboard
1 | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
2 | 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 | 3 | <dependencies> |
4 | - <deployment defaultVersion="1536" identifier="iOS"/> | |
4 | + <deployment defaultVersion="1792" identifier="iOS"/> | |
5 | 5 | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/> |
6 | 6 | </dependencies> |
7 | 7 | <scenes> |
... | ... | @@ -116,10 +116,10 @@ |
116 | 116 | </objects> |
117 | 117 | <point key="canvasLocation" x="834" y="-9"/> |
118 | 118 | </scene> |
119 | - <!--Navigation Controller--> | |
119 | + <!--Custom Navigation Controller--> | |
120 | 120 | <scene sceneID="Ker-Z3-hzQ"> |
121 | 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 | 123 | <navigationBar key="navigationBar" contentMode="scaleToFill" id="fTx-P1-hLO"> |
124 | 124 | <autoresizingMask key="autoresizingMask"/> |
125 | 125 | </navigationBar> | ... | ... |
DUREX tests/MenuTableViewController.h
DUREX tests/MenuTableViewController.m
... | ... | @@ -7,6 +7,7 @@ |
7 | 7 | // |
8 | 8 | |
9 | 9 | #import "MenuTableViewController.h" |
10 | +#import "DUREXAppDelegate.h" | |
10 | 11 | |
11 | 12 | @interface MenuTableViewController () |
12 | 13 | { |
... | ... | @@ -71,9 +72,12 @@ |
71 | 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 | 81 | [self setCurrentNavLevel:level]; |
78 | 82 | [self setCurrentCellIdentifier:[[self cellIdentifiers] objectAtIndex:[self currentNavLevel]]]; |
79 | 83 | if([self currentNavLevel] == MAINTENANCE) |
... | ... | @@ -81,6 +85,7 @@ |
81 | 85 | [self setCurrentElements:[self maintenanceElements]]; |
82 | 86 | [self setCurrentStructure:[self maintenanceStructure]]; |
83 | 87 | [self setCurrentHeaders:[self maintenanceHeaders]]; |
88 | + | |
84 | 89 | } |
85 | 90 | //AND SO ON... |
86 | 91 | else |
... | ... | @@ -94,6 +99,13 @@ |
94 | 99 | NSIndexSet *sections = [NSIndexSet indexSetWithIndexesInRange:range]; |
95 | 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 | 110 | - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section |
99 | 111 | { |
... | ... | @@ -128,7 +140,11 @@ |
128 | 140 | |
129 | 141 | //Set navigation level |
130 | 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 | 149 | // Uncomment the following line to preserve selection between presentations. |
134 | 150 | // self.clearsSelectionOnViewWillAppear = NO; |
... | ... | @@ -162,13 +178,13 @@ |
162 | 178 | |
163 | 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 | 182 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; |
167 | 183 | NSString *cellName = [[[[self tableView] cellForRowAtIndexPath:indexPath]textLabel]text]; |
168 | 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 | 204 | |
189 | 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 | 208 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:[self currentCellIdentifier] forIndexPath:indexPath]; |
193 | 209 | |
194 | 210 | if (cell == nil) |
195 | 211 | { |
196 | - NSLog(@"Initializing cell"); | |
212 | + NSLog(@"[MenuTableViewController.m]: Initializing cell"); | |
197 | 213 | if([self currentNavLevel] == MAINTENANCE) |
198 | 214 | { |
199 | - NSLog(@"Dispatching Maintenance-type cell"); | |
215 | + NSLog(@"[MenuTableViewController.m]: Dispatching Maintenance-type cell"); | |
200 | 216 | cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:[self currentCellIdentifier]]; |
201 | 217 | } |
202 | 218 | else |
... | ... | @@ -215,7 +231,7 @@ |
215 | 231 | [[cell textLabel] setText:[[self currentElements] objectAtIndex:[indexPath row]+offset]]; |
216 | 232 | if([self currentNavLevel] == MAINTENANCE) |
217 | 233 | { |
218 | - NSLog(@"Customizing cell for navLevel MAINTENANCE"); | |
234 | + NSLog(@"[MenuTableViewController.m]: Customizing cell for navLevel MAINTENANCE"); | |
219 | 235 | [[cell detailTextLabel] setText:@"VALUE"]; |
220 | 236 | [cell setAccessoryView: [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"icon_checkmark"]]]; |
221 | 237 | if( [[[cell textLabel] text] isEqualToString:@"5€ Notes"]) | ... | ... |
DUREX tests/Stack.m
... | ... | @@ -27,7 +27,6 @@ |
27 | 27 | - (void) push: (id) element |
28 | 28 | { |
29 | 29 | [[self dataArray] addObject:element]; |
30 | - printf("%d elements in array\n",[self count]); | |
31 | 30 | } |
32 | 31 | - (id) pop |
33 | 32 | { |
... | ... | @@ -42,7 +41,7 @@ |
42 | 41 | } |
43 | 42 | - (void) clear |
44 | 43 | { |
45 | - | |
44 | + [[self dataArray] removeAllObjects]; | |
46 | 45 | } |
47 | 46 | |
48 | 47 | @end | ... | ... |