Commit 742ac0261a086c6bbe14128cedccdd085f073250
1 parent
36cd46f5
--no commit message
Showing
18 changed files
with
407 additions
and
159 deletions
DUREX Vendor Control/CommunicationProtocol.m
@@ -14,7 +14,8 @@ | @@ -14,7 +14,8 @@ | ||
14 | 14 | ||
15 | @implementation CommunicationProtocol | 15 | @implementation CommunicationProtocol |
16 | 16 | ||
17 | -+ (id)sharedProtocol { | 17 | ++ (id)sharedProtocol |
18 | +{ | ||
18 | static CommunicationProtocol *shared = nil; | 19 | static CommunicationProtocol *shared = nil; |
19 | static dispatch_once_t onceToken; | 20 | static dispatch_once_t onceToken; |
20 | dispatch_once(&onceToken, ^{ | 21 | dispatch_once(&onceToken, ^{ |
@@ -41,7 +42,6 @@ | @@ -41,7 +42,6 @@ | ||
41 | { | 42 | { |
42 | NSLog(@"[CommunicationProtocol.m]: %@",error); | 43 | NSLog(@"[CommunicationProtocol.m]: %@",error); |
43 | }]; | 44 | }]; |
44 | - [NSThread sleepForTimeInterval:10]; | ||
45 | } | 45 | } |
46 | 46 | ||
47 | -(void) readMessageAvailableDevice | 47 | -(void) readMessageAvailableDevice |
@@ -62,7 +62,6 @@ | @@ -62,7 +62,6 @@ | ||
62 | { | 62 | { |
63 | NSLog(@"[CommunicationProtocol.m]: %@",error); | 63 | NSLog(@"[CommunicationProtocol.m]: %@",error); |
64 | }]; | 64 | }]; |
65 | - [NSThread sleepForTimeInterval:10]; | ||
66 | } | 65 | } |
67 | 66 | ||
68 | -(Boolean) waitForMessageAvailableMobile: (Boolean) status | 67 | -(Boolean) waitForMessageAvailableMobile: (Boolean) status |
@@ -173,8 +172,7 @@ | @@ -173,8 +172,7 @@ | ||
173 | } | 172 | } |
174 | [[EMConnectionManager sharedManager] writeValue:@"0" toResource:@"messageAvailableDevice" onSuccess:^ | 173 | [[EMConnectionManager sharedManager] writeValue:@"0" toResource:@"messageAvailableDevice" onSuccess:^ |
175 | { | 174 | { |
176 | - NSLog(@"[CommunicationProtocol.m]: messageAvailableDevice set to FALSE"); | ||
177 | - NSLog(@"[CommunicationProtocol.m]: Message received: %@",message); | 175 | + NSLog(@"[CommunicationProtocol.m]: messageAvailableDevice set to FALSE"); |
178 | } | 176 | } |
179 | onFail:^(NSError *error) | 177 | onFail:^(NSError *error) |
180 | { | 178 | { |
@@ -189,23 +187,30 @@ | @@ -189,23 +187,30 @@ | ||
189 | { | 187 | { |
190 | unsigned long remainingBytes = [message length]; | 188 | unsigned long remainingBytes = [message length]; |
191 | uint8_t numBytes, current_index = 0; | 189 | uint8_t numBytes, current_index = 0; |
192 | - __block Boolean status = TRUE; | 190 | + __block Boolean status = FALSE; |
191 | + __block Boolean blockCompleted = FALSE; | ||
193 | [[EMConnectionManager sharedManager] writeValue:@"0" toResource:@"messageAvailableMobile" onSuccess:^ | 192 | [[EMConnectionManager sharedManager] writeValue:@"0" toResource:@"messageAvailableMobile" onSuccess:^ |
194 | { | 193 | { |
195 | status = TRUE; | 194 | status = TRUE; |
196 | NSLog(@"[CommunicationProtocol.m]: messageAvailableMobile set to FALSE"); | 195 | NSLog(@"[CommunicationProtocol.m]: messageAvailableMobile set to FALSE"); |
196 | + blockCompleted = TRUE; | ||
197 | } | 197 | } |
198 | onFail:^(NSError *error) | 198 | onFail:^(NSError *error) |
199 | { | 199 | { |
200 | NSLog(@"[CommunicationProtocol.m]: %@",error); | 200 | NSLog(@"[CommunicationProtocol.m]: %@",error); |
201 | status = FALSE; | 201 | status = FALSE; |
202 | - } | ||
203 | - ]; | 202 | + blockCompleted = TRUE; |
203 | + }]; | ||
204 | + while(blockCompleted != TRUE) | ||
205 | + { | ||
206 | + [NSThread sleepForTimeInterval:1]; | ||
207 | + } | ||
208 | + NSLog(@"[CommunicationProtocol.m]: messageAvailableMobile write block completed"); | ||
209 | + blockCompleted = FALSE; | ||
204 | [[EMConnectionManager sharedManager] writeValue:[NSNumber numberWithUnsignedChar:(unsigned char)([message length]/MAX_STRING_LENGTH)+1] toResource:@"numPackets" onSuccess:^ | 210 | [[EMConnectionManager sharedManager] writeValue:[NSNumber numberWithUnsignedChar:(unsigned char)([message length]/MAX_STRING_LENGTH)+1] toResource:@"numPackets" onSuccess:^ |
205 | { | 211 | { |
206 | status = TRUE; | 212 | status = TRUE; |
207 | NSLog(@"[CommunicationProtocol.m]: numPackets set to %d",([message length]/MAX_STRING_LENGTH) + 1); | 213 | NSLog(@"[CommunicationProtocol.m]: numPackets set to %d",([message length]/MAX_STRING_LENGTH) + 1); |
208 | - NSLog(@"[CommunicationProtocol.m]: new status is: %d",status); | ||
209 | } | 214 | } |
210 | onFail:^(NSError *error) | 215 | onFail:^(NSError *error) |
211 | { | 216 | { |
@@ -269,7 +274,7 @@ | @@ -269,7 +274,7 @@ | ||
269 | { | 274 | { |
270 | status = TRUE; | 275 | status = TRUE; |
271 | NSLog(@"[CommunicationProtocol.m]: messageAvailableMobile set to TRUE"); | 276 | NSLog(@"[CommunicationProtocol.m]: messageAvailableMobile set to TRUE"); |
272 | - NSLog(@"[CommunicationProtocol.m]: Message written"); | 277 | + NSLog(@"[CommunicationProtocol.m]: Packet written"); |
273 | } | 278 | } |
274 | onFail:^(NSError *error) | 279 | onFail:^(NSError *error) |
275 | { | 280 | { |
@@ -282,7 +287,10 @@ | @@ -282,7 +287,10 @@ | ||
282 | } | 287 | } |
283 | } | 288 | } |
284 | } | 289 | } |
285 | - NSLog(@"[CommunicationProtocol.m]: Device has processed the message"); | 290 | + if(![self waitForMessageAvailableMobile:FALSE]) |
291 | + { | ||
292 | + NSLog(@"[CommunicationProtocol.m]: Device has processed the message"); | ||
293 | + } | ||
286 | return status; | 294 | return status; |
287 | } | 295 | } |
288 | 296 | ||
@@ -301,7 +309,7 @@ | @@ -301,7 +309,7 @@ | ||
301 | } | 309 | } |
302 | } | 310 | } |
303 | NSLog(@"[CommunicationProtocol.m]: Error while establishing connection"); | 311 | NSLog(@"[CommunicationProtocol.m]: Error while establishing connection"); |
304 | - return TRUE; | 312 | + return TRUE; //HACK! |
305 | } | 313 | } |
306 | 314 | ||
307 | -(Boolean) updateTime: (NSDateComponents*) date | 315 | -(Boolean) updateTime: (NSDateComponents*) date |
DUREX Vendor Control/DUREX Vendor Control.xcodeproj/project.pbxproj
@@ -19,6 +19,9 @@ | @@ -19,6 +19,9 @@ | ||
19 | 34AAB885189804FF0019860D /* EMDevicePickerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34AAB87A189804FF0019860D /* EMDevicePickerViewController.m */; }; | 19 | 34AAB885189804FF0019860D /* EMDevicePickerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34AAB87A189804FF0019860D /* EMDevicePickerViewController.m */; }; |
20 | 34AAB889189804FF0019860D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 34AAB880189804FF0019860D /* main.m */; }; | 20 | 34AAB889189804FF0019860D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 34AAB880189804FF0019860D /* main.m */; }; |
21 | 34AAB88D189805300019860D /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 34AAB88C189805300019860D /* Images.xcassets */; }; | 21 | 34AAB88D189805300019860D /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 34AAB88C189805300019860D /* Images.xcassets */; }; |
22 | + F933F80419B6819400521B90 /* DatePickerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F933F80219B6819400521B90 /* DatePickerViewController.m */; }; | ||
23 | + F933F80519B6819400521B90 /* DatePickerViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F933F80319B6819400521B90 /* DatePickerViewController.xib */; }; | ||
24 | + F933F80719B681E000521B90 /* DatePickerViewController_iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = F933F80619B681E000521B90 /* DatePickerViewController_iPad.xib */; }; | ||
22 | F961D804199A5F1000E9282C /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F961D806199A5F1000E9282C /* MainStoryboard.storyboard */; }; | 25 | F961D804199A5F1000E9282C /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F961D806199A5F1000E9282C /* MainStoryboard.storyboard */; }; |
23 | F961D80C199A5F2D00E9282C /* back_arrow.png in Resources */ = {isa = PBXBuildFile; fileRef = F961D80E199A5F2D00E9282C /* back_arrow.png */; }; | 26 | F961D80C199A5F2D00E9282C /* back_arrow.png in Resources */ = {isa = PBXBuildFile; fileRef = F961D80E199A5F2D00E9282C /* back_arrow.png */; }; |
24 | F961D816199A5FA000E9282C /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = F961D814199A5FA000E9282C /* Localizable.strings */; }; | 27 | F961D816199A5FA000E9282C /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = F961D814199A5FA000E9282C /* Localizable.strings */; }; |
@@ -72,6 +75,10 @@ | @@ -72,6 +75,10 @@ | ||
72 | 34AAB87F189804FF0019860D /* DUREX Vendor Control-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "DUREX Vendor Control-Prefix.pch"; path = "FirstAppExample/DUREX Vendor Control-Prefix.pch"; sourceTree = SOURCE_ROOT; }; | 75 | 34AAB87F189804FF0019860D /* DUREX Vendor Control-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "DUREX Vendor Control-Prefix.pch"; path = "FirstAppExample/DUREX Vendor Control-Prefix.pch"; sourceTree = SOURCE_ROOT; }; |
73 | 34AAB880189804FF0019860D /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = FirstAppExample/main.m; sourceTree = SOURCE_ROOT; }; | 76 | 34AAB880189804FF0019860D /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = FirstAppExample/main.m; sourceTree = SOURCE_ROOT; }; |
74 | 34AAB88C189805300019860D /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = FirstAppExample/Images.xcassets; sourceTree = SOURCE_ROOT; }; | 77 | 34AAB88C189805300019860D /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = FirstAppExample/Images.xcassets; sourceTree = SOURCE_ROOT; }; |
78 | + F933F80119B6819400521B90 /* DatePickerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DatePickerViewController.h; sourceTree = SOURCE_ROOT; }; | ||
79 | + F933F80219B6819400521B90 /* DatePickerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DatePickerViewController.m; sourceTree = SOURCE_ROOT; }; | ||
80 | + F933F80319B6819400521B90 /* DatePickerViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DatePickerViewController.xib; sourceTree = SOURCE_ROOT; }; | ||
81 | + F933F80619B681E000521B90 /* DatePickerViewController_iPad.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DatePickerViewController_iPad.xib; sourceTree = SOURCE_ROOT; }; | ||
75 | F961D807199A5F1800E9282C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainStoryboard.storyboard; sourceTree = "<group>"; }; | 82 | F961D807199A5F1800E9282C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainStoryboard.storyboard; sourceTree = "<group>"; }; |
76 | F961D809199A5F2200E9282C /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/MainStoryboard.strings; sourceTree = "<group>"; }; | 83 | F961D809199A5F2200E9282C /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/MainStoryboard.strings; sourceTree = "<group>"; }; |
77 | F961D80B199A5F2300E9282C /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/MainStoryboard.strings; sourceTree = "<group>"; }; | 84 | F961D80B199A5F2300E9282C /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/MainStoryboard.strings; sourceTree = "<group>"; }; |
@@ -167,6 +174,10 @@ | @@ -167,6 +174,10 @@ | ||
167 | F98356DA192EAFD400EA6821 /* CommunicationProtocol.m */, | 174 | F98356DA192EAFD400EA6821 /* CommunicationProtocol.m */, |
168 | F9A8EF7A192FE201009E7532 /* Stack.h */, | 175 | F9A8EF7A192FE201009E7532 /* Stack.h */, |
169 | F9A8EF7B192FE201009E7532 /* Stack.m */, | 176 | F9A8EF7B192FE201009E7532 /* Stack.m */, |
177 | + F933F80119B6819400521B90 /* DatePickerViewController.h */, | ||
178 | + F933F80219B6819400521B90 /* DatePickerViewController.m */, | ||
179 | + F933F80319B6819400521B90 /* DatePickerViewController.xib */, | ||
180 | + F933F80619B681E000521B90 /* DatePickerViewController_iPad.xib */, | ||
170 | 34AAB88C189805300019860D /* Images.xcassets */, | 181 | 34AAB88C189805300019860D /* Images.xcassets */, |
171 | 347186B91807290E00FA0FB2 /* Schemas */, | 182 | 347186B91807290E00FA0FB2 /* Schemas */, |
172 | 347186A718070F7F00FA0FB2 /* Device Picker */, | 183 | 347186A718070F7F00FA0FB2 /* Device Picker */, |
@@ -316,7 +327,9 @@ | @@ -316,7 +327,9 @@ | ||
316 | isa = PBXResourcesBuildPhase; | 327 | isa = PBXResourcesBuildPhase; |
317 | buildActionMask = 2147483647; | 328 | buildActionMask = 2147483647; |
318 | files = ( | 329 | files = ( |
330 | + F933F80519B6819400521B90 /* DatePickerViewController.xib in Resources */, | ||
319 | F98356D8192E906600EA6821 /* bluetooth.png in Resources */, | 331 | F98356D8192E906600EA6821 /* bluetooth.png in Resources */, |
332 | + F933F80719B681E000521B90 /* DatePickerViewController_iPad.xib in Resources */, | ||
320 | F961D819199A711300E9282C /* EMConnectingView.xib in Resources */, | 333 | F961D819199A711300E9282C /* EMConnectingView.xib in Resources */, |
321 | F9C77F50192CDE30002DBE8A /* system.json in Resources */, | 334 | F9C77F50192CDE30002DBE8A /* system.json in Resources */, |
322 | F961D80C199A5F2D00E9282C /* back_arrow.png in Resources */, | 335 | F961D80C199A5F2D00E9282C /* back_arrow.png in Resources */, |
@@ -340,6 +353,7 @@ | @@ -340,6 +353,7 @@ | ||
340 | isa = PBXSourcesBuildPhase; | 353 | isa = PBXSourcesBuildPhase; |
341 | buildActionMask = 2147483647; | 354 | buildActionMask = 2147483647; |
342 | files = ( | 355 | files = ( |
356 | + F933F80419B6819400521B90 /* DatePickerViewController.m in Sources */, | ||
343 | F98356D6192E835F00EA6821 /* InitialViewController.m in Sources */, | 357 | F98356D6192E835F00EA6821 /* InitialViewController.m in Sources */, |
344 | F9A8EF7C192FE201009E7532 /* Stack.m in Sources */, | 358 | F9A8EF7C192FE201009E7532 /* Stack.m in Sources */, |
345 | 34AAB885189804FF0019860D /* EMDevicePickerViewController.m in Sources */, | 359 | 34AAB885189804FF0019860D /* EMDevicePickerViewController.m in Sources */, |
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
@@ -10,11 +10,11 @@ | @@ -10,11 +10,11 @@ | ||
10 | ignoreCount = "0" | 10 | ignoreCount = "0" |
11 | continueAfterRunningActions = "No" | 11 | continueAfterRunningActions = "No" |
12 | filePath = "CommunicationProtocol.m" | 12 | filePath = "CommunicationProtocol.m" |
13 | - timestampString = "431362674.335425" | 13 | + timestampString = "431391382.511911" |
14 | startingColumnNumber = "9223372036854775807" | 14 | startingColumnNumber = "9223372036854775807" |
15 | endingColumnNumber = "9223372036854775807" | 15 | endingColumnNumber = "9223372036854775807" |
16 | - startingLineNumber = "110" | ||
17 | - endingLineNumber = "110" | 16 | + startingLineNumber = "109" |
17 | + endingLineNumber = "109" | ||
18 | landmarkName = "-readMessage" | 18 | landmarkName = "-readMessage" |
19 | landmarkType = "5"> | 19 | landmarkType = "5"> |
20 | </BreakpointContent> | 20 | </BreakpointContent> |
@@ -42,11 +42,11 @@ | @@ -42,11 +42,11 @@ | ||
42 | ignoreCount = "0" | 42 | ignoreCount = "0" |
43 | continueAfterRunningActions = "No" | 43 | continueAfterRunningActions = "No" |
44 | filePath = "CommunicationProtocol.m" | 44 | filePath = "CommunicationProtocol.m" |
45 | - timestampString = "431362674.335425" | 45 | + timestampString = "431391382.511911" |
46 | startingColumnNumber = "9223372036854775807" | 46 | startingColumnNumber = "9223372036854775807" |
47 | endingColumnNumber = "9223372036854775807" | 47 | endingColumnNumber = "9223372036854775807" |
48 | - startingLineNumber = "101" | ||
49 | - endingLineNumber = "101" | 48 | + startingLineNumber = "100" |
49 | + endingLineNumber = "100" | ||
50 | landmarkName = "-waitForMessageAvailableDevice:" | 50 | landmarkName = "-waitForMessageAvailableDevice:" |
51 | landmarkType = "5"> | 51 | landmarkType = "5"> |
52 | </BreakpointContent> | 52 | </BreakpointContent> |
@@ -58,30 +58,14 @@ | @@ -58,30 +58,14 @@ | ||
58 | ignoreCount = "0" | 58 | ignoreCount = "0" |
59 | continueAfterRunningActions = "No" | 59 | continueAfterRunningActions = "No" |
60 | filePath = "CommunicationProtocol.m" | 60 | filePath = "CommunicationProtocol.m" |
61 | - timestampString = "431362674.335425" | 61 | + timestampString = "431391382.511911" |
62 | startingColumnNumber = "9223372036854775807" | 62 | startingColumnNumber = "9223372036854775807" |
63 | endingColumnNumber = "9223372036854775807" | 63 | endingColumnNumber = "9223372036854775807" |
64 | - startingLineNumber = "105" | ||
65 | - endingLineNumber = "105" | 64 | + startingLineNumber = "104" |
65 | + endingLineNumber = "104" | ||
66 | landmarkName = "-waitForMessageAvailableDevice:" | 66 | landmarkName = "-waitForMessageAvailableDevice:" |
67 | landmarkType = "5"> | 67 | landmarkType = "5"> |
68 | </BreakpointContent> | 68 | </BreakpointContent> |
69 | </BreakpointProxy> | 69 | </BreakpointProxy> |
70 | - <BreakpointProxy | ||
71 | - BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint"> | ||
72 | - <BreakpointContent | ||
73 | - shouldBeEnabled = "Yes" | ||
74 | - ignoreCount = "0" | ||
75 | - continueAfterRunningActions = "No" | ||
76 | - filePath = "CommunicationProtocol.m" | ||
77 | - timestampString = "431363609.871016" | ||
78 | - startingColumnNumber = "9223372036854775807" | ||
79 | - endingColumnNumber = "9223372036854775807" | ||
80 | - startingLineNumber = "193" | ||
81 | - endingLineNumber = "193" | ||
82 | - landmarkName = "-writeMessage:" | ||
83 | - landmarkType = "5"> | ||
84 | - </BreakpointContent> | ||
85 | - </BreakpointProxy> | ||
86 | </Breakpoints> | 70 | </Breakpoints> |
87 | </Bucket> | 71 | </Bucket> |
DUREX Vendor Control/DatePickerViewController.h
0 โ 100644
1 | +// | ||
2 | +// DatePickerViewController.h | ||
3 | +// DUREX Vendor Control | ||
4 | +// | ||
5 | +// Created by Imanol Barba on 03/09/14. | ||
6 | +// Copyright (c) 2014 Emmoco. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +@class DatePickerViewController; | ||
10 | + | ||
11 | +#import <UIKit/UIKit.h> | ||
12 | +#import <QuartzCore/QuartzCore.h> | ||
13 | +#import "DUREXAppDelegate.h" | ||
14 | + | ||
15 | +@protocol DatePickerViewControllerDelegate <NSObject> | ||
16 | +- (void)addItemViewController:(DatePickerViewController*)controller didFinishEnteringItem:(NSDate *)date; | ||
17 | + | ||
18 | +@end | ||
19 | + | ||
20 | +@interface DatePickerViewController : UIViewController | ||
21 | + | ||
22 | +@property (strong, nonatomic) IBOutlet UIView *datePickerView; | ||
23 | +@property (strong, nonatomic) IBOutlet UIDatePicker *datePicker; | ||
24 | +@property (nonatomic, strong) id <DatePickerViewControllerDelegate> delegate; | ||
25 | + | ||
26 | +- (void)showInView:(UIView *)aView animated:(BOOL)animated; | ||
27 | +- (IBAction)closePopup:(id)sender; | ||
28 | + | ||
29 | +@end |
DUREX Vendor Control/DatePickerViewController.m
0 โ 100644
1 | +// | ||
2 | +// DatePickerViewController.m | ||
3 | +// DUREX Vendor Control | ||
4 | +// | ||
5 | +// Created by Imanol Barba on 03/09/14. | ||
6 | +// Copyright (c) 2014 Emmoco. All rights reserved. | ||
7 | +// | ||
8 | + | ||
9 | +#import "DatePickerViewController.h" | ||
10 | + | ||
11 | +@interface DatePickerViewController () | ||
12 | + | ||
13 | +@end | ||
14 | + | ||
15 | +@implementation DatePickerViewController | ||
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 | + self.view.backgroundColor=[[UIColor blackColor] colorWithAlphaComponent:.7]; | ||
29 | + self.datePickerView.layer.cornerRadius = 5; | ||
30 | + self.datePickerView.layer.shadowOpacity = 0.8; | ||
31 | + self.datePickerView.layer.shadowOffset = CGSizeMake(0.0f, 0.0f); | ||
32 | + [super viewDidLoad]; | ||
33 | + // Do any additional setup after loading the view from its nib. | ||
34 | +} | ||
35 | + | ||
36 | +- (void)didReceiveMemoryWarning | ||
37 | +{ | ||
38 | + [super didReceiveMemoryWarning]; | ||
39 | + // Dispose of any resources that can be recreated. | ||
40 | +} | ||
41 | + | ||
42 | +- (void)showAnimate | ||
43 | +{ | ||
44 | + self.view.transform = CGAffineTransformMakeScale(1.3, 1.3); | ||
45 | + self.view.alpha = 0; | ||
46 | + [UIView animateWithDuration:.25 animations:^{ | ||
47 | + self.view.alpha = 1; | ||
48 | + self.view.transform = CGAffineTransformMakeScale(1, 1); | ||
49 | + }]; | ||
50 | +} | ||
51 | + | ||
52 | +- (void)removeAnimate | ||
53 | +{ | ||
54 | + [UIView animateWithDuration:.25 animations:^{ | ||
55 | + self.view.transform = CGAffineTransformMakeScale(1.3, 1.3); | ||
56 | + self.view.alpha = 0.0; | ||
57 | + } completion:^(BOOL finished) { | ||
58 | + if (finished) { | ||
59 | + [self.view removeFromSuperview]; | ||
60 | + } | ||
61 | + }]; | ||
62 | +} | ||
63 | + | ||
64 | +- (IBAction)closePopup:(id)sender | ||
65 | +{ | ||
66 | + [self.delegate addItemViewController:self didFinishEnteringItem:[[self datePicker] date]]; | ||
67 | + [self removeAnimate]; | ||
68 | +} | ||
69 | + | ||
70 | +- (void)showInView:(UIView *)aView animated:(BOOL)animated | ||
71 | +{ | ||
72 | + [aView addSubview:self.view]; | ||
73 | + if (animated) { | ||
74 | + [self showAnimate]; | ||
75 | + } | ||
76 | +} | ||
77 | + | ||
78 | +@end |
DUREX Vendor Control/DatePickerViewController.xib
0 โ 100644
1 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="5056" systemVersion="13E28" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES"> | ||
3 | + <dependencies> | ||
4 | + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/> | ||
5 | + </dependencies> | ||
6 | + <objects> | ||
7 | + <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="DatePickerViewController"> | ||
8 | + <connections> | ||
9 | + <outlet property="datePicker" destination="6Ex-R5-AYV" id="50R-pL-vEb"/> | ||
10 | + <outlet property="datePickerView" destination="o92-Jq-3Xo" id="IOi-YU-3Wz"/> | ||
11 | + <outlet property="view" destination="7fx-e7-JEt" id="dL9-Ac-hWL"/> | ||
12 | + </connections> | ||
13 | + </placeholder> | ||
14 | + <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> | ||
15 | + <view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="7fx-e7-JEt"> | ||
16 | + <rect key="frame" x="0.0" y="0.0" width="320" height="568"/> | ||
17 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
18 | + <subviews> | ||
19 | + <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="o92-Jq-3Xo"> | ||
20 | + <rect key="frame" x="6" y="105" width="308" height="282"/> | ||
21 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | ||
22 | + <subviews> | ||
23 | + <datePicker contentMode="scaleToFill" ambiguous="YES" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" datePickerMode="dateAndTime" minuteInterval="1" translatesAutoresizingMaskIntoConstraints="NO" id="6Ex-R5-AYV"> | ||
24 | + <rect key="frame" x="-6" y="62" width="320" height="162"/> | ||
25 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/> | ||
26 | + <date key="date" timeIntervalSinceReferenceDate="431369786.91497999"> | ||
27 | + <!--2014-09-02 16:56:26 +0000--> | ||
28 | + </date> | ||
29 | + <timeZone key="timeZone" name="America/Los_Angeles"> | ||
30 | + <mutableData key="data"> | ||
31 | +VFppZgAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAC5AAAABAAAABCepkign7sVkKCGKqChmveQ | ||
32 | +y4kaoNIj9HDSYSYQ1v50INiArZDa/tGg28CQENzes6DdqayQ3r6VoN+JjpDgnneg4WlwkOJ+WaDjSVKQ | ||
33 | +5F47oOUpNJDmR1gg5xJREOgnOiDo8jMQ6gccIOrSFRDr5v4g7LH3EO3G4CDukdkQ76/8oPBxuxDxj96g | ||
34 | +8n/BkPNvwKD0X6OQ9U+ioPY/hZD3L4Sg+CiiEPkPZqD6CIQQ+viDIPvoZhD82GUg/chIEP64RyD/qCoQ | ||
35 | +AJgpIAGIDBACeAsgA3EokARhJ6AFUQqQBkEJoAcw7JAHjUOgCRDOkAmtvyAK8LCQC+CvoAzZzRANwJGg | ||
36 | +DrmvEA+priAQmZEQEYmQIBJ5cxATaXIgFFlVEBVJVCAWOTcQFyk2IBgiU5AZCRggGgI1kBryNKAb4heQ | ||
37 | +HNIWoB3B+ZAesfigH6HbkCB2KyAhgb2QIlYNICNq2hAkNe8gJUq8ECYV0SAnKp4QJ/7toCkKgBAp3s+g | ||
38 | +KupiECu+saAs036QLZ6ToC6zYJAvfnWgMJNCkDFnkiAycySQM0d0IDRTBpA1J1YgNjLokDcHOCA4HAUQ | ||
39 | +OOcaIDn75xA6xvwgO9vJEDywGKA9u6sQPo/6oD+bjRBAb9ygQYSpkEJPvqBDZIuQRC+goEVEbZBF89Mg | ||
40 | +Ry2KEEfTtSBJDWwQSbOXIErtThBLnLOgTNZqkE18laBOtkyQT1x3oFCWLpBRPFmgUnYQkFMcO6BUVfKQ | ||
41 | +VPwdoFY11JBW5TogWB7xEFjFHCBZ/tMQWqT+IFvetRBchOAgXb6XEF5kwiBfnnkQYE3eoGGHlZBiLcCg | ||
42 | +Y2d3kGQNoqBlR1mQZe2EoGcnO5BnzWagaQcdkGmtSKBq5v+Qa5ZlIGzQHBBtdkcgbq/+EG9WKSBwj+AQ | ||
43 | +cTYLIHJvwhBzFe0gdE+kEHT/CaB2OMCQdt7roHgYopB4vs2gefiEkHqer6B72GaQfH6RoH24SJB+XnOg | ||
44 | +f5gqkAABAAECAwEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA | ||
45 | +AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA | ||
46 | +AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA | ||
47 | +AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA | ||
48 | +</mutableData> | ||
49 | + </timeZone> | ||
50 | + </datePicker> | ||
51 | + <button opaque="NO" contentMode="scaleToFill" ambiguous="YES" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8vW-ig-tUA"> | ||
52 | + <rect key="frame" x="131" y="232" width="46" height="30"/> | ||
53 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | ||
54 | + <state key="normal" title="Done"> | ||
55 | + <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/> | ||
56 | + </state> | ||
57 | + </button> | ||
58 | + </subviews> | ||
59 | + <color key="backgroundColor" white="1" alpha="0.95000000000000007" colorSpace="calibratedWhite"/> | ||
60 | + <constraints> | ||
61 | + <constraint firstItem="8vW-ig-tUA" firstAttribute="top" secondItem="6Ex-R5-AYV" secondAttribute="bottom" constant="8" id="M7C-4g-jy1"/> | ||
62 | + <constraint firstItem="6Ex-R5-AYV" firstAttribute="centerX" secondItem="8vW-ig-tUA" secondAttribute="centerX" id="QvW-cT-g8h"/> | ||
63 | + </constraints> | ||
64 | + </view> | ||
65 | + </subviews> | ||
66 | + <color key="backgroundColor" red="0.95549071730000001" green="1" blue="0.92158219299999999" alpha="0.0" colorSpace="calibratedRGB"/> | ||
67 | + <simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/> | ||
68 | + <simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/> | ||
69 | + </view> | ||
70 | + </objects> | ||
71 | +</document> |
DUREX Vendor Control/DatePickerViewController_iPad.xib
0 โ 100644
1 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="5056" systemVersion="13E28" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES"> | ||
3 | + <dependencies> | ||
4 | + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/> | ||
5 | + </dependencies> | ||
6 | + <objects> | ||
7 | + <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="DatePickerViewController"> | ||
8 | + <connections> | ||
9 | + <outlet property="datePicker" destination="3XX-v6-qTY" id="qfi-lb-ugf"/> | ||
10 | + <outlet property="datePickerView" destination="YoS-Cq-kfN" id="hBr-Ni-E9T"/> | ||
11 | + <outlet property="view" destination="NTl-ub-Wso" id="3xk-Ph-uV2"/> | ||
12 | + </connections> | ||
13 | + </placeholder> | ||
14 | + <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/> | ||
15 | + <view contentMode="scaleToFill" id="NTl-ub-Wso"> | ||
16 | + <rect key="frame" x="0.0" y="0.0" width="768" height="1024"/> | ||
17 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | ||
18 | + <subviews> | ||
19 | + <view contentMode="scaleToFill" ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="YoS-Cq-kfN"> | ||
20 | + <rect key="frame" x="192" y="256" width="384" height="321"/> | ||
21 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | ||
22 | + <subviews> | ||
23 | + <datePicker contentMode="scaleToFill" ambiguous="YES" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" datePickerMode="dateAndTime" minuteInterval="1" translatesAutoresizingMaskIntoConstraints="NO" id="3XX-v6-qTY"> | ||
24 | + <rect key="frame" x="-192" y="47" width="768" height="216"/> | ||
25 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/> | ||
26 | + <date key="date" timeIntervalSinceReferenceDate="431372189.40412599"> | ||
27 | + <!--2014-09-02 17:36:29 +0000--> | ||
28 | + </date> | ||
29 | + <timeZone key="timeZone" name="America/Los_Angeles"> | ||
30 | + <mutableData key="data"> | ||
31 | +VFppZgAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAC5AAAABAAAABCepkign7sVkKCGKqChmveQ | ||
32 | +y4kaoNIj9HDSYSYQ1v50INiArZDa/tGg28CQENzes6DdqayQ3r6VoN+JjpDgnneg4WlwkOJ+WaDjSVKQ | ||
33 | +5F47oOUpNJDmR1gg5xJREOgnOiDo8jMQ6gccIOrSFRDr5v4g7LH3EO3G4CDukdkQ76/8oPBxuxDxj96g | ||
34 | +8n/BkPNvwKD0X6OQ9U+ioPY/hZD3L4Sg+CiiEPkPZqD6CIQQ+viDIPvoZhD82GUg/chIEP64RyD/qCoQ | ||
35 | +AJgpIAGIDBACeAsgA3EokARhJ6AFUQqQBkEJoAcw7JAHjUOgCRDOkAmtvyAK8LCQC+CvoAzZzRANwJGg | ||
36 | +DrmvEA+priAQmZEQEYmQIBJ5cxATaXIgFFlVEBVJVCAWOTcQFyk2IBgiU5AZCRggGgI1kBryNKAb4heQ | ||
37 | +HNIWoB3B+ZAesfigH6HbkCB2KyAhgb2QIlYNICNq2hAkNe8gJUq8ECYV0SAnKp4QJ/7toCkKgBAp3s+g | ||
38 | +KupiECu+saAs036QLZ6ToC6zYJAvfnWgMJNCkDFnkiAycySQM0d0IDRTBpA1J1YgNjLokDcHOCA4HAUQ | ||
39 | +OOcaIDn75xA6xvwgO9vJEDywGKA9u6sQPo/6oD+bjRBAb9ygQYSpkEJPvqBDZIuQRC+goEVEbZBF89Mg | ||
40 | +Ry2KEEfTtSBJDWwQSbOXIErtThBLnLOgTNZqkE18laBOtkyQT1x3oFCWLpBRPFmgUnYQkFMcO6BUVfKQ | ||
41 | +VPwdoFY11JBW5TogWB7xEFjFHCBZ/tMQWqT+IFvetRBchOAgXb6XEF5kwiBfnnkQYE3eoGGHlZBiLcCg | ||
42 | +Y2d3kGQNoqBlR1mQZe2EoGcnO5BnzWagaQcdkGmtSKBq5v+Qa5ZlIGzQHBBtdkcgbq/+EG9WKSBwj+AQ | ||
43 | +cTYLIHJvwhBzFe0gdE+kEHT/CaB2OMCQdt7roHgYopB4vs2gefiEkHqer6B72GaQfH6RoH24SJB+XnOg | ||
44 | +f5gqkAABAAECAwEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA | ||
45 | +AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA | ||
46 | +AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA | ||
47 | +AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA | ||
48 | +</mutableData> | ||
49 | + </timeZone> | ||
50 | + </datePicker> | ||
51 | + <button opaque="NO" contentMode="scaleToFill" ambiguous="YES" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="RGE-Ye-qon"> | ||
52 | + <rect key="frame" x="169" y="271" width="46" height="30"/> | ||
53 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | ||
54 | + <state key="normal" title="Done"> | ||
55 | + <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/> | ||
56 | + </state> | ||
57 | + </button> | ||
58 | + </subviews> | ||
59 | + <color key="backgroundColor" white="1" alpha="0.94999999999999996" colorSpace="custom" customColorSpace="calibratedWhite"/> | ||
60 | + <constraints> | ||
61 | + <constraint firstItem="RGE-Ye-qon" firstAttribute="top" secondItem="3XX-v6-qTY" secondAttribute="bottom" constant="8" id="6iZ-h3-wEL"/> | ||
62 | + <constraint firstItem="3XX-v6-qTY" firstAttribute="centerX" secondItem="RGE-Ye-qon" secondAttribute="centerX" id="8nT-zM-hgt"/> | ||
63 | + </constraints> | ||
64 | + </view> | ||
65 | + </subviews> | ||
66 | + <color key="backgroundColor" white="1" alpha="0.0" colorSpace="custom" customColorSpace="calibratedWhite"/> | ||
67 | + <constraints> | ||
68 | + <constraint firstAttribute="centerY" secondItem="YoS-Cq-kfN" secondAttribute="centerY" constant="95.5" id="IRy-Yg-Vj5"/> | ||
69 | + <constraint firstAttribute="centerX" secondItem="YoS-Cq-kfN" secondAttribute="centerX" id="d3A-NR-o0K"/> | ||
70 | + </constraints> | ||
71 | + <simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/> | ||
72 | + </view> | ||
73 | + </objects> | ||
74 | +</document> |
DUREX Vendor Control/FirstAppExample/Base.lproj/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="13E28" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="kWw-Rk-wD6"> |
3 | <dependencies> | 3 | <dependencies> |
4 | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/> | 4 | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/> |
5 | </dependencies> | 5 | </dependencies> |
@@ -201,9 +201,13 @@ | @@ -201,9 +201,13 @@ | ||
201 | <rect key="frame" x="0.0" y="0.0" width="320" height="568"/> | 201 | <rect key="frame" x="0.0" y="0.0" width="320" height="568"/> |
202 | <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | 202 | <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
203 | <subviews> | 203 | <subviews> |
204 | - <button opaque="NO" contentMode="scaleAspectFit" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bXZ-vt-REt"> | 204 | + <button opaque="NO" contentMode="scaleAspectFit" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bXZ-vt-REt"> |
205 | <rect key="frame" x="96" y="220" width="128" height="128"/> | 205 | <rect key="frame" x="96" y="220" width="128" height="128"/> |
206 | <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | 206 | <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
207 | + <constraints> | ||
208 | + <constraint firstAttribute="height" constant="128" id="2bH-ZR-Aih"/> | ||
209 | + <constraint firstAttribute="width" constant="128" id="q5G-rK-bjg"/> | ||
210 | + </constraints> | ||
207 | <state key="normal" image="bluetooth.png"> | 211 | <state key="normal" image="bluetooth.png"> |
208 | <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/> | 212 | <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/> |
209 | </state> | 213 | </state> |
DUREX Vendor Control/MenuTableViewController.h
@@ -10,6 +10,7 @@ | @@ -10,6 +10,7 @@ | ||
10 | #import "EMFramework.h" | 10 | #import "EMFramework.h" |
11 | #import "CommunicationProtocol.h" | 11 | #import "CommunicationProtocol.h" |
12 | #import "Stack.h" | 12 | #import "Stack.h" |
13 | +#import "DatePickerViewController.h" | ||
13 | 14 | ||
14 | #define num(x) [NSNumber numberWithUnsignedInt:x] | 15 | #define num(x) [NSNumber numberWithUnsignedInt:x] |
15 | 16 | ||
@@ -39,12 +40,11 @@ enum { | @@ -39,12 +40,11 @@ enum { | ||
39 | REPORT, | 40 | REPORT, |
40 | } navigationLevel; | 41 | } navigationLevel; |
41 | 42 | ||
42 | -@interface MenuTableViewController : UITableViewController | 43 | +@interface MenuTableViewController : UITableViewController <DatePickerViewControllerDelegate> |
43 | 44 | ||
44 | @property (strong,nonatomic) Stack *parentLayout; | 45 | @property (strong,nonatomic) Stack *parentLayout; |
45 | -@property (strong,nonatomic) IBOutlet UIView *popUpView; | 46 | +@property (strong,nonatomic) DatePickerViewController *popupViewController; |
46 | 47 | ||
47 | - (void) navBack; | 48 | - (void) navBack; |
48 | -- (void)showInView:(UIView *)aView animated:(BOOL)animated; | ||
49 | 49 | ||
50 | @end | 50 | @end |
DUREX Vendor Control/MenuTableViewController.m
@@ -216,14 +216,6 @@ | @@ -216,14 +216,6 @@ | ||
216 | [self initializeMenuEntries]; | 216 | [self initializeMenuEntries]; |
217 | self.currentNavLevel = 255; | 217 | self.currentNavLevel = 255; |
218 | [self changeNavLevel:MENU:FALSE]; | 218 | [self changeNavLevel:MENU:FALSE]; |
219 | - self.popUpView.layer.cornerRadius = 5; | ||
220 | - self.popUpView.layer.shadowOpacity = 0.8; | ||
221 | - self.popUpView.layer.shadowOffset = CGSizeMake(0.0f, 0.0f); | ||
222 | - /* | ||
223 | - DUREXAppDelegate *appDelegate = (DUREXAppDelegate *)[[UIApplication sharedApplication] delegate]; | ||
224 | - CustomNavigationController *navController = [appDelegate navController]; | ||
225 | - navController.auxController = self; | ||
226 | - */ | ||
227 | 219 | ||
228 | // Uncomment the following line to preserve selection between presentations. | 220 | // Uncomment the following line to preserve selection between presentations. |
229 | // self.clearsSelectionOnViewWillAppear = NO; | 221 | // self.clearsSelectionOnViewWillAppear = NO; |
@@ -234,8 +226,7 @@ | @@ -234,8 +226,7 @@ | ||
234 | 226 | ||
235 | -(void)didReceiveNotification:(NSNotification*) notification | 227 | -(void)didReceiveNotification:(NSNotification*) notification |
236 | { | 228 | { |
237 | - id notificationValue = [[notification userInfo] objectForKey:kEMIndicatorResourceValueKey]; | ||
238 | - NSString *resourceName = [[notification userInfo] objectForKey:kEMIndicatorNameKey]; | 229 | + |
239 | } | 230 | } |
240 | 231 | ||
241 | -(void)dealloc | 232 | -(void)dealloc |
@@ -282,16 +273,27 @@ | @@ -282,16 +273,27 @@ | ||
282 | NSLog(@"[MenuTableViewController.m]: Changing to navLevel: SALES"); | 273 | NSLog(@"[MenuTableViewController.m]: Changing to navLevel: SALES"); |
283 | [self changeNavLevel:SALES:TRUE]; | 274 | [self changeNavLevel:SALES:TRUE]; |
284 | } | 275 | } |
285 | - else if([cellName isEqualToString:NSLocalizedString(@"Sales log", nil)] && [self currentNavLevel] == MAINTENANCE) | ||
286 | - { | ||
287 | - NSLog(@"[MenuTableViewController.m]: Changing to navLevel: SALES"); | ||
288 | - [self changeNavLevel:SALES:TRUE]; | ||
289 | - } | ||
290 | else if([cellName isEqualToString:NSLocalizedString(@"Basic Configuration", nil)] && [self currentNavLevel] == MENU) | 276 | else if([cellName isEqualToString:NSLocalizedString(@"Basic Configuration", nil)] && [self currentNavLevel] == MENU) |
291 | { | 277 | { |
292 | NSLog(@"[MenuTableViewController.m]: Changing to navLevel: BASIC_CONFIGURATION"); | 278 | NSLog(@"[MenuTableViewController.m]: Changing to navLevel: BASIC_CONFIGURATION"); |
293 | [self changeNavLevel:BASIC_CONFIGURATION:TRUE]; | 279 | [self changeNavLevel:BASIC_CONFIGURATION:TRUE]; |
294 | } | 280 | } |
281 | + //Update Date & Time command | ||
282 | + else if([cellName isEqualToString:NSLocalizedString(@"Update Date & Time", nil)] && [self currentNavLevel] == BASIC_CONFIGURATION) | ||
283 | + { | ||
284 | + if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) | ||
285 | + { | ||
286 | + self.popupViewController = [[DatePickerViewController alloc] initWithNibName:@"DatePickerViewController_iPad" bundle:nil]; | ||
287 | + self.popupViewController.delegate = self; | ||
288 | + [self.popupViewController showInView:self.navigationController.view animated:YES]; | ||
289 | + } | ||
290 | + else | ||
291 | + { | ||
292 | + self.popupViewController = [[DatePickerViewController alloc] initWithNibName:@"DatePickerViewController" bundle:nil]; | ||
293 | + self.popupViewController.delegate = self; | ||
294 | + [self.popupViewController showInView:self.navigationController.view animated:YES]; | ||
295 | + } | ||
296 | + } | ||
295 | } | 297 | } |
296 | 298 | ||
297 | #pragma mark - Table view data source | 299 | #pragma mark - Table view data source |
@@ -353,49 +355,18 @@ | @@ -353,49 +355,18 @@ | ||
353 | } | 355 | } |
354 | else if([self currentNavLevel] == SALES) | 356 | else if([self currentNavLevel] == SALES) |
355 | { | 357 | { |
356 | - | 358 | + //Customize SALES cells if needed |
357 | } | 359 | } |
358 | return cell; | 360 | return cell; |
359 | } | 361 | } |
360 | 362 | ||
361 | -- (void)showAnimate | 363 | +- (void)addItemViewController:(DatePickerViewController *)controller didFinishEnteringItem:(NSDate *)date |
362 | { | 364 | { |
363 | - self.view.transform = CGAffineTransformMakeScale(1.3, 1.3); | ||
364 | - self.view.alpha = 0; | ||
365 | - [UIView animateWithDuration:.25 animations:^ | ||
366 | - { | ||
367 | - self.view.alpha = 1; | ||
368 | - self.view.transform = CGAffineTransformMakeScale(1, 1); | ||
369 | - }]; | ||
370 | -} | ||
371 | - | ||
372 | -- (void)removeAnimate | ||
373 | -{ | ||
374 | - [UIView animateWithDuration:.25 animations:^ | ||
375 | - { | ||
376 | - self.view.transform = CGAffineTransformMakeScale(1.3, 1.3); | ||
377 | - self.view.alpha = 0.0; | ||
378 | - } completion:^(BOOL finished) | ||
379 | - { | ||
380 | - if (finished) | ||
381 | - { | ||
382 | - [self.view removeFromSuperview]; | ||
383 | - } | ||
384 | - }]; | ||
385 | -} | ||
386 | - | ||
387 | -- (IBAction)closePopup:(id)sender | ||
388 | -{ | ||
389 | - [self removeAnimate]; | ||
390 | -} | ||
391 | - | ||
392 | -- (void)showInView:(UIView *)aView animated:(BOOL)animated | ||
393 | -{ | ||
394 | - [aView addSubview:self.view]; | ||
395 | - if (animated) | ||
396 | - { | ||
397 | - [self showAnimate]; | ||
398 | - } | 365 | + NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; |
366 | + NSCalendarUnit units = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit; | ||
367 | + NSDateComponents *components = [calendar components:units fromDate:date]; | ||
368 | + NSLog(@"[MenuTableViewController.m]: %@", components); | ||
369 | + [_protocol updateTime: components]; | ||
399 | } | 370 | } |
400 | 371 | ||
401 | 372 |
DUREX tests/Base.lproj/DatePickerViewController.xib
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.XIB" version="3.0" toolsVersion="5056" systemVersion="12F45" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES"> | 2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="5056" systemVersion="13E28" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES"> |
3 | <dependencies> | 3 | <dependencies> |
4 | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/> | 4 | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/> |
5 | </dependencies> | 5 | </dependencies> |
6 | <objects> | 6 | <objects> |
7 | - <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="PopupViewController"> | 7 | + <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="DatePickerViewController"> |
8 | <connections> | 8 | <connections> |
9 | <outlet property="datePicker" destination="Kq0-yG-icP" id="0Sh-9C-xLc"/> | 9 | <outlet property="datePicker" destination="Kq0-yG-icP" id="0Sh-9C-xLc"/> |
10 | - <outlet property="datePickerView" destination="i5M-Pr-FkT" id="dES-lr-Zb0"/> | 10 | + <outlet property="datePickerView" destination="Wcy-ZP-X0O" id="ymS-rw-gQV"/> |
11 | <outlet property="view" destination="i5M-Pr-FkT" id="Pih-UT-VNB"/> | 11 | <outlet property="view" destination="i5M-Pr-FkT" id="Pih-UT-VNB"/> |
12 | </connections> | 12 | </connections> |
13 | </placeholder> | 13 | </placeholder> |
@@ -16,24 +16,18 @@ | @@ -16,24 +16,18 @@ | ||
16 | <rect key="frame" x="0.0" y="0.0" width="320" height="568"/> | 16 | <rect key="frame" x="0.0" y="0.0" width="320" height="568"/> |
17 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | 17 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
18 | <subviews> | 18 | <subviews> |
19 | - <button opaque="NO" contentMode="scaleToFill" ambiguous="YES" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7QC-Xa-liQ"> | ||
20 | - <rect key="frame" x="137" y="336" width="46" height="30"/> | 19 | + <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Wcy-ZP-X0O"> |
20 | + <rect key="frame" x="6" y="105" width="308" height="282"/> | ||
21 | <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | 21 | <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> |
22 | - <state key="normal" title="Done"> | ||
23 | - <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/> | ||
24 | - </state> | ||
25 | - <connections> | ||
26 | - <action selector="closePopup:" destination="-1" eventType="touchUpInside" id="oX3-hN-sqE"/> | ||
27 | - </connections> | ||
28 | - </button> | ||
29 | - <datePicker contentMode="scaleToFill" ambiguous="YES" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" datePickerMode="dateAndTime" minuteInterval="1" translatesAutoresizingMaskIntoConstraints="NO" id="Kq0-yG-icP"> | ||
30 | - <rect key="frame" x="0.0" y="138" width="320" height="162"/> | ||
31 | - <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/> | ||
32 | - <date key="date" timeIntervalSinceReferenceDate="431369786.91497999"> | ||
33 | - <!--2014-09-02 16:56:26 +0000--> | ||
34 | - </date> | ||
35 | - <timeZone key="timeZone" name="America/Los_Angeles"> | ||
36 | - <mutableData key="data"> | 22 | + <subviews> |
23 | + <datePicker contentMode="scaleToFill" ambiguous="YES" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" datePickerMode="dateAndTime" minuteInterval="1" translatesAutoresizingMaskIntoConstraints="NO" id="Kq0-yG-icP"> | ||
24 | + <rect key="frame" x="-6" y="62" width="320" height="162"/> | ||
25 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/> | ||
26 | + <date key="date" timeIntervalSinceReferenceDate="431369786.91497999"> | ||
27 | + <!--2014-09-02 16:56:26 +0000--> | ||
28 | + </date> | ||
29 | + <timeZone key="timeZone" name="America/Los_Angeles"> | ||
30 | + <data key="data"> | ||
37 | VFppZgAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAC5AAAABAAAABCepkign7sVkKCGKqChmveQ | 31 | VFppZgAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAC5AAAABAAAABCepkign7sVkKCGKqChmveQ |
38 | y4kaoNIj9HDSYSYQ1v50INiArZDa/tGg28CQENzes6DdqayQ3r6VoN+JjpDgnneg4WlwkOJ+WaDjSVKQ | 32 | y4kaoNIj9HDSYSYQ1v50INiArZDa/tGg28CQENzes6DdqayQ3r6VoN+JjpDgnneg4WlwkOJ+WaDjSVKQ |
39 | 5F47oOUpNJDmR1gg5xJREOgnOiDo8jMQ6gccIOrSFRDr5v4g7LH3EO3G4CDukdkQ76/8oPBxuxDxj96g | 33 | 5F47oOUpNJDmR1gg5xJREOgnOiDo8jMQ6gccIOrSFRDr5v4g7LH3EO3G4CDukdkQ76/8oPBxuxDxj96g |
@@ -51,16 +45,28 @@ f5gqkAABAAECAwEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA | @@ -51,16 +45,28 @@ f5gqkAABAAECAwEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA | ||
51 | AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA | 45 | AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA |
52 | AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA | 46 | AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA |
53 | AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA | 47 | AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA |
54 | -</mutableData> | ||
55 | - </timeZone> | ||
56 | - </datePicker> | 48 | +</data> |
49 | + </timeZone> | ||
50 | + </datePicker> | ||
51 | + <button opaque="NO" contentMode="scaleToFill" ambiguous="YES" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="7QC-Xa-liQ"> | ||
52 | + <rect key="frame" x="131" y="232" width="46" height="30"/> | ||
53 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | ||
54 | + <state key="normal" title="Done"> | ||
55 | + <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/> | ||
56 | + </state> | ||
57 | + <connections> | ||
58 | + <action selector="closePopup:" destination="-1" eventType="touchUpInside" id="oX3-hN-sqE"/> | ||
59 | + </connections> | ||
60 | + </button> | ||
61 | + </subviews> | ||
62 | + <color key="backgroundColor" white="1" alpha="0.95000000000000007" colorSpace="calibratedWhite"/> | ||
63 | + <constraints> | ||
64 | + <constraint firstItem="7QC-Xa-liQ" firstAttribute="top" secondItem="Kq0-yG-icP" secondAttribute="bottom" constant="8" id="a8P-cg-FP1"/> | ||
65 | + <constraint firstItem="Kq0-yG-icP" firstAttribute="centerX" secondItem="7QC-Xa-liQ" secondAttribute="centerX" id="jMO-k4-MyY"/> | ||
66 | + </constraints> | ||
67 | + </view> | ||
57 | </subviews> | 68 | </subviews> |
58 | - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> | ||
59 | - <constraints> | ||
60 | - <constraint firstAttribute="centerX" secondItem="Kq0-yG-icP" secondAttribute="centerX" id="0GY-9z-buv"/> | ||
61 | - <constraint firstItem="7QC-Xa-liQ" firstAttribute="centerX" secondItem="Kq0-yG-icP" secondAttribute="centerX" id="kfK-JU-v9W"/> | ||
62 | - <constraint firstItem="7QC-Xa-liQ" firstAttribute="top" secondItem="Kq0-yG-icP" secondAttribute="bottom" constant="36" id="wkh-LB-fLl"/> | ||
63 | - </constraints> | 69 | + <color key="backgroundColor" red="0.95549071732042212" green="1" blue="0.92158219296691768" alpha="0.0" colorSpace="calibratedRGB"/> |
64 | <simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/> | 70 | <simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/> |
65 | <simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/> | 71 | <simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/> |
66 | </view> | 72 | </view> |
DUREX tests/Base.lproj/DatePickerViewController_iPad.xib
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.iPad.XIB" version="3.0" toolsVersion="5056" systemVersion="12F45" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES"> | 2 | +<document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="5056" systemVersion="13E28" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES"> |
3 | <dependencies> | 3 | <dependencies> |
4 | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/> | 4 | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/> |
5 | </dependencies> | 5 | </dependencies> |
6 | <objects> | 6 | <objects> |
7 | - <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="PopupViewController"> | 7 | + <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="DatePickerViewController"> |
8 | <connections> | 8 | <connections> |
9 | <outlet property="datePicker" destination="Ye8-NM-1gf" id="BK3-lm-uDP"/> | 9 | <outlet property="datePicker" destination="Ye8-NM-1gf" id="BK3-lm-uDP"/> |
10 | - <outlet property="datePickerView" destination="iN0-l3-epB" id="syx-4N-lWz"/> | 10 | + <outlet property="datePickerView" destination="Qea-QB-MAC" id="yqY-R8-t1T"/> |
11 | <outlet property="view" destination="iN0-l3-epB" id="ily-fa-aEh"/> | 11 | <outlet property="view" destination="iN0-l3-epB" id="ily-fa-aEh"/> |
12 | </connections> | 12 | </connections> |
13 | </placeholder> | 13 | </placeholder> |
@@ -16,14 +16,18 @@ | @@ -16,14 +16,18 @@ | ||
16 | <rect key="frame" x="0.0" y="0.0" width="768" height="1024"/> | 16 | <rect key="frame" x="0.0" y="0.0" width="768" height="1024"/> |
17 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> | 17 | <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> |
18 | <subviews> | 18 | <subviews> |
19 | - <datePicker contentMode="scaleToFill" ambiguous="YES" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" datePickerMode="dateAndTime" minuteInterval="1" translatesAutoresizingMaskIntoConstraints="NO" id="Ye8-NM-1gf"> | ||
20 | - <rect key="frame" x="0.0" y="269" width="768" height="216"/> | ||
21 | - <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/> | ||
22 | - <date key="date" timeIntervalSinceReferenceDate="431372189.40412599"> | ||
23 | - <!--2014-09-02 17:36:29 +0000--> | ||
24 | - </date> | ||
25 | - <timeZone key="timeZone" name="America/Los_Angeles"> | ||
26 | - <mutableData key="data"> | 19 | + <view contentMode="scaleToFill" ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Qea-QB-MAC"> |
20 | + <rect key="frame" x="192" y="256" width="384" height="321"/> | ||
21 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | ||
22 | + <subviews> | ||
23 | + <datePicker contentMode="scaleToFill" ambiguous="YES" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" datePickerMode="dateAndTime" minuteInterval="1" translatesAutoresizingMaskIntoConstraints="NO" id="Ye8-NM-1gf"> | ||
24 | + <rect key="frame" x="-192" y="47" width="768" height="216"/> | ||
25 | + <autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMaxY="YES"/> | ||
26 | + <date key="date" timeIntervalSinceReferenceDate="431372189.40412599"> | ||
27 | + <!--2014-09-02 17:36:29 +0000--> | ||
28 | + </date> | ||
29 | + <timeZone key="timeZone" name="America/Los_Angeles"> | ||
30 | + <data key="data"> | ||
27 | VFppZgAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAC5AAAABAAAABCepkign7sVkKCGKqChmveQ | 31 | VFppZgAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAC5AAAABAAAABCepkign7sVkKCGKqChmveQ |
28 | y4kaoNIj9HDSYSYQ1v50INiArZDa/tGg28CQENzes6DdqayQ3r6VoN+JjpDgnneg4WlwkOJ+WaDjSVKQ | 32 | y4kaoNIj9HDSYSYQ1v50INiArZDa/tGg28CQENzes6DdqayQ3r6VoN+JjpDgnneg4WlwkOJ+WaDjSVKQ |
29 | 5F47oOUpNJDmR1gg5xJREOgnOiDo8jMQ6gccIOrSFRDr5v4g7LH3EO3G4CDukdkQ76/8oPBxuxDxj96g | 33 | 5F47oOUpNJDmR1gg5xJREOgnOiDo8jMQ6gccIOrSFRDr5v4g7LH3EO3G4CDukdkQ76/8oPBxuxDxj96g |
@@ -41,25 +45,31 @@ f5gqkAABAAECAwEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA | @@ -41,25 +45,31 @@ f5gqkAABAAECAwEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA | ||
41 | AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA | 45 | AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA |
42 | AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA | 46 | AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA |
43 | AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA | 47 | AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA |
44 | -</mutableData> | ||
45 | - </timeZone> | ||
46 | - </datePicker> | ||
47 | - <button opaque="NO" contentMode="scaleToFill" ambiguous="YES" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="b32-QI-eSJ"> | ||
48 | - <rect key="frame" x="361" y="511" width="46" height="30"/> | ||
49 | - <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | ||
50 | - <state key="normal" title="Done"> | ||
51 | - <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/> | ||
52 | - </state> | ||
53 | - <connections> | ||
54 | - <action selector="closePopup:" destination="-1" eventType="touchUpInside" id="zqQ-J8-LT0"/> | ||
55 | - </connections> | ||
56 | - </button> | 48 | +</data> |
49 | + </timeZone> | ||
50 | + </datePicker> | ||
51 | + <button opaque="NO" contentMode="scaleToFill" ambiguous="YES" misplaced="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="b32-QI-eSJ"> | ||
52 | + <rect key="frame" x="169" y="271" width="46" height="30"/> | ||
53 | + <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/> | ||
54 | + <state key="normal" title="Done"> | ||
55 | + <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/> | ||
56 | + </state> | ||
57 | + <connections> | ||
58 | + <action selector="closePopup:" destination="-1" eventType="touchUpInside" id="zqQ-J8-LT0"/> | ||
59 | + </connections> | ||
60 | + </button> | ||
61 | + </subviews> | ||
62 | + <color key="backgroundColor" white="1" alpha="0.95000000000000007" colorSpace="custom" customColorSpace="calibratedWhite"/> | ||
63 | + <constraints> | ||
64 | + <constraint firstItem="b32-QI-eSJ" firstAttribute="top" secondItem="Ye8-NM-1gf" secondAttribute="bottom" constant="8" id="kLC-bc-bhQ"/> | ||
65 | + <constraint firstItem="Ye8-NM-1gf" firstAttribute="centerX" secondItem="b32-QI-eSJ" secondAttribute="centerX" id="uy2-qe-Oz3"/> | ||
66 | + </constraints> | ||
67 | + </view> | ||
57 | </subviews> | 68 | </subviews> |
58 | - <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> | 69 | + <color key="backgroundColor" white="1" alpha="0.0" colorSpace="custom" customColorSpace="calibratedWhite"/> |
59 | <constraints> | 70 | <constraints> |
60 | - <constraint firstItem="b32-QI-eSJ" firstAttribute="centerX" secondItem="Ye8-NM-1gf" secondAttribute="centerX" id="9Og-RH-pFc"/> | ||
61 | - <constraint firstAttribute="centerX" secondItem="Ye8-NM-1gf" secondAttribute="centerX" id="GZr-bO-HrS"/> | ||
62 | - <constraint firstItem="b32-QI-eSJ" firstAttribute="top" secondItem="Ye8-NM-1gf" secondAttribute="bottom" constant="34" id="X3X-ac-hcm"/> | 71 | + <constraint firstAttribute="centerX" secondItem="Qea-QB-MAC" secondAttribute="centerX" id="60a-hQ-woe"/> |
72 | + <constraint firstAttribute="centerY" secondItem="Qea-QB-MAC" secondAttribute="centerY" constant="95.5" id="eNe-B1-DMX"/> | ||
63 | </constraints> | 73 | </constraints> |
64 | <simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/> | 74 | <simulatedStatusBarMetrics key="simulatedStatusBarMetrics"/> |
65 | </view> | 75 | </view> |
DUREX tests/Base.lproj/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="13E28" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" initialViewController="kWw-Rk-wD6"> |
3 | <dependencies> | 3 | <dependencies> |
4 | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/> | 4 | <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3733"/> |
5 | </dependencies> | 5 | </dependencies> |
DUREX tests/DUREX test.xcodeproj/project.pbxproj
@@ -31,7 +31,6 @@ | @@ -31,7 +31,6 @@ | ||
31 | F98ACEDC19B6294E00D90AEE /* DatePickerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F98ACEDA19B6294E00D90AEE /* DatePickerViewController.m */; }; | 31 | F98ACEDC19B6294E00D90AEE /* DatePickerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F98ACEDA19B6294E00D90AEE /* DatePickerViewController.m */; }; |
32 | F9AB5A6F19B63931006785E4 /* DatePickerViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F9AB5A7119B63931006785E4 /* DatePickerViewController.xib */; }; | 32 | F9AB5A6F19B63931006785E4 /* DatePickerViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F9AB5A7119B63931006785E4 /* DatePickerViewController.xib */; }; |
33 | F9AB5A7219B63938006785E4 /* DatePickerViewController_iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = F9AB5A7419B63938006785E4 /* DatePickerViewController_iPad.xib */; }; | 33 | F9AB5A7219B63938006785E4 /* DatePickerViewController_iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = F9AB5A7419B63938006785E4 /* DatePickerViewController_iPad.xib */; }; |
34 | - F9C77F50192CDE30002DBE8A /* durex.json in Resources */ = {isa = PBXBuildFile; fileRef = F9C77F4F192CDE30002DBE8A /* durex.json */; }; | ||
35 | /* End PBXBuildFile section */ | 34 | /* End PBXBuildFile section */ |
36 | 35 | ||
37 | /* Begin PBXContainerItemProxy section */ | 36 | /* Begin PBXContainerItemProxy section */ |
@@ -88,7 +87,6 @@ | @@ -88,7 +87,6 @@ | ||
88 | F9AB5A7819B6393D006785E4 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/DatePickerViewController.strings; sourceTree = "<group>"; }; | 87 | F9AB5A7819B6393D006785E4 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/DatePickerViewController.strings; sourceTree = "<group>"; }; |
89 | F9AB5A7A19B6393F006785E4 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/DatePickerViewController_iPad.strings; sourceTree = "<group>"; }; | 88 | F9AB5A7A19B6393F006785E4 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/DatePickerViewController_iPad.strings; sourceTree = "<group>"; }; |
90 | F9AB5A7C19B63940006785E4 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/DatePickerViewController_iPad.strings; sourceTree = "<group>"; }; | 89 | F9AB5A7C19B63940006785E4 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/DatePickerViewController_iPad.strings; sourceTree = "<group>"; }; |
91 | - F9C77F4F192CDE30002DBE8A /* durex.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = durex.json; sourceTree = SOURCE_ROOT; }; | ||
92 | /* End PBXFileReference section */ | 90 | /* End PBXFileReference section */ |
93 | 91 | ||
94 | /* Begin PBXFrameworksBuildPhase section */ | 92 | /* Begin PBXFrameworksBuildPhase section */ |
@@ -208,7 +206,6 @@ | @@ -208,7 +206,6 @@ | ||
208 | 347186B91807290E00FA0FB2 /* Schemas */ = { | 206 | 347186B91807290E00FA0FB2 /* Schemas */ = { |
209 | isa = PBXGroup; | 207 | isa = PBXGroup; |
210 | children = ( | 208 | children = ( |
211 | - F9C77F4F192CDE30002DBE8A /* durex.json */, | ||
212 | ); | 209 | ); |
213 | name = Schemas; | 210 | name = Schemas; |
214 | sourceTree = "<group>"; | 211 | sourceTree = "<group>"; |
@@ -292,7 +289,6 @@ | @@ -292,7 +289,6 @@ | ||
292 | buildActionMask = 2147483647; | 289 | buildActionMask = 2147483647; |
293 | files = ( | 290 | files = ( |
294 | F98356D8192E906600EA6821 /* bluetooth.png in Resources */, | 291 | F98356D8192E906600EA6821 /* bluetooth.png in Resources */, |
295 | - F9C77F50192CDE30002DBE8A /* durex.json in Resources */, | ||
296 | F9AB5A6F19B63931006785E4 /* DatePickerViewController.xib in Resources */, | 292 | F9AB5A6F19B63931006785E4 /* DatePickerViewController.xib in Resources */, |
297 | 34AAB88D189805300019860D /* Images.xcassets in Resources */, | 293 | 34AAB88D189805300019860D /* Images.xcassets in Resources */, |
298 | F92B0B6C19993D3F00CAEF3E /* Localizable.strings in Resources */, | 294 | F92B0B6C19993D3F00CAEF3E /* Localizable.strings in Resources */, |
DUREX tests/DUREX test.xcodeproj/project.xcworkspace/xcuserdata/imanol.xcuserdatad/UserInterfaceState.xcuserstate
No preview for this file type
DUREX tests/DatePickerViewController.m
@@ -25,7 +25,6 @@ | @@ -25,7 +25,6 @@ | ||
25 | 25 | ||
26 | - (void)viewDidLoad | 26 | - (void)viewDidLoad |
27 | { | 27 | { |
28 | - self.view.backgroundColor=[[UIColor blackColor] colorWithAlphaComponent:.6]; | ||
29 | self.datePickerView.layer.cornerRadius = 5; | 28 | self.datePickerView.layer.cornerRadius = 5; |
30 | self.datePickerView.layer.shadowOpacity = 0.8; | 29 | self.datePickerView.layer.shadowOpacity = 0.8; |
31 | self.datePickerView.layer.shadowOffset = CGSizeMake(0.0f, 0.0f); | 30 | self.datePickerView.layer.shadowOffset = CGSizeMake(0.0f, 0.0f); |
DUREX tests/MenuTableViewController.m
@@ -270,12 +270,15 @@ | @@ -270,12 +270,15 @@ | ||
270 | { | 270 | { |
271 | if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) | 271 | if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) |
272 | { | 272 | { |
273 | + //self.popupViewController = [[DatePickerViewController alloc] initWithNibName:@"DatePickerViewController_iPad" bundle:nil]; | ||
273 | self.popupViewController = [[DatePickerViewController alloc] initWithNibName:@"DatePickerViewController_iPad" bundle:nil]; | 274 | self.popupViewController = [[DatePickerViewController alloc] initWithNibName:@"DatePickerViewController_iPad" bundle:nil]; |
275 | + self.popupViewController.delegate = self; | ||
274 | [self.popupViewController showInView:self.navigationController.view animated:YES]; | 276 | [self.popupViewController showInView:self.navigationController.view animated:YES]; |
275 | } | 277 | } |
276 | else | 278 | else |
277 | { | 279 | { |
278 | self.popupViewController = [[DatePickerViewController alloc] initWithNibName:@"DatePickerViewController" bundle:nil]; | 280 | self.popupViewController = [[DatePickerViewController alloc] initWithNibName:@"DatePickerViewController" bundle:nil]; |
281 | + self.popupViewController.delegate = self; | ||
279 | [self.popupViewController showInView:self.navigationController.view animated:YES]; | 282 | [self.popupViewController showInView:self.navigationController.view animated:YES]; |
280 | } | 283 | } |
281 | } | 284 | } |
@@ -351,7 +354,8 @@ | @@ -351,7 +354,8 @@ | ||
351 | NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; | 354 | NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; |
352 | NSCalendarUnit units = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit; | 355 | NSCalendarUnit units = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit; |
353 | NSDateComponents *components = [calendar components:units fromDate:date]; | 356 | NSDateComponents *components = [calendar components:units fromDate:date]; |
354 | - [_protocol updateTime: components]; | 357 | + NSLog(@"[MenuTableViewController.m]: %@", components); |
358 | + //[_protocol updateTime: components]; | ||
355 | } | 359 | } |
356 | 360 | ||
357 | 361 |