From 742ac0261a086c6bbe14128cedccdd085f073250 Mon Sep 17 00:00:00 2001 From: Imanol-Mikel Barba Sabariego Date: Wed, 3 Sep 2014 00:11:04 +0000 Subject: [PATCH] --- DUREX Vendor Control/CommunicationProtocol.m | 32 ++++++++++++++++++++------------ DUREX Vendor Control/DUREX Vendor Control.xcodeproj/project.pbxproj | 14 ++++++++++++++ DUREX Vendor Control/DUREX Vendor Control.xcodeproj/project.xcworkspace/xcuserdata/imanol.xcuserdatad/UserInterfaceState.xcuserstate | Bin 68544 -> 0 bytes DUREX Vendor Control/DUREX Vendor Control.xcodeproj/xcuserdata/imanol.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist | 34 +++++++++------------------------- DUREX Vendor Control/DatePickerViewController.h | 29 +++++++++++++++++++++++++++++ DUREX Vendor Control/DatePickerViewController.m | 78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ DUREX Vendor Control/DatePickerViewController.xib | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ DUREX Vendor Control/DatePickerViewController_iPad.xib | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ DUREX Vendor Control/FirstAppExample/Base.lproj/MainStoryboard.storyboard | 8 ++++++-- DUREX Vendor Control/MenuTableViewController.h | 6 +++--- DUREX Vendor Control/MenuTableViewController.m | 77 ++++++++++++++++++++++++----------------------------------------------------- DUREX tests/Base.lproj/DatePickerViewController.xib | 64 +++++++++++++++++++++++++++++++++++----------------------------- DUREX tests/Base.lproj/DatePickerViewController_iPad.xib | 66 ++++++++++++++++++++++++++++++++++++++---------------------------- DUREX tests/Base.lproj/MainStoryboard.storyboard | 2 +- DUREX tests/DUREX test.xcodeproj/project.pbxproj | 4 ---- DUREX tests/DUREX test.xcodeproj/project.xcworkspace/xcuserdata/imanol.xcuserdatad/UserInterfaceState.xcuserstate | Bin 163220 -> 0 bytes DUREX tests/DatePickerViewController.m | 1 - DUREX tests/MenuTableViewController.m | 6 +++++- 18 files changed, 407 insertions(+), 159 deletions(-) create mode 100644 DUREX Vendor Control/DatePickerViewController.h create mode 100644 DUREX Vendor Control/DatePickerViewController.m create mode 100644 DUREX Vendor Control/DatePickerViewController.xib create mode 100644 DUREX Vendor Control/DatePickerViewController_iPad.xib diff --git a/DUREX Vendor Control/CommunicationProtocol.m b/DUREX Vendor Control/CommunicationProtocol.m index f7b6451..1fabfac 100644 --- a/DUREX Vendor Control/CommunicationProtocol.m +++ b/DUREX Vendor Control/CommunicationProtocol.m @@ -14,7 +14,8 @@ @implementation CommunicationProtocol -+ (id)sharedProtocol { ++ (id)sharedProtocol +{ static CommunicationProtocol *shared = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ @@ -41,7 +42,6 @@ { NSLog(@"[CommunicationProtocol.m]: %@",error); }]; - [NSThread sleepForTimeInterval:10]; } -(void) readMessageAvailableDevice @@ -62,7 +62,6 @@ { NSLog(@"[CommunicationProtocol.m]: %@",error); }]; - [NSThread sleepForTimeInterval:10]; } -(Boolean) waitForMessageAvailableMobile: (Boolean) status @@ -173,8 +172,7 @@ } [[EMConnectionManager sharedManager] writeValue:@"0" toResource:@"messageAvailableDevice" onSuccess:^ { - NSLog(@"[CommunicationProtocol.m]: messageAvailableDevice set to FALSE"); - NSLog(@"[CommunicationProtocol.m]: Message received: %@",message); + NSLog(@"[CommunicationProtocol.m]: messageAvailableDevice set to FALSE"); } onFail:^(NSError *error) { @@ -189,23 +187,30 @@ { unsigned long remainingBytes = [message length]; uint8_t numBytes, current_index = 0; - __block Boolean status = TRUE; + __block Boolean status = FALSE; + __block Boolean blockCompleted = FALSE; [[EMConnectionManager sharedManager] writeValue:@"0" toResource:@"messageAvailableMobile" onSuccess:^ { status = TRUE; NSLog(@"[CommunicationProtocol.m]: messageAvailableMobile set to FALSE"); + blockCompleted = TRUE; } onFail:^(NSError *error) { NSLog(@"[CommunicationProtocol.m]: %@",error); status = FALSE; - } - ]; + blockCompleted = TRUE; + }]; + while(blockCompleted != TRUE) + { + [NSThread sleepForTimeInterval:1]; + } + NSLog(@"[CommunicationProtocol.m]: messageAvailableMobile write block completed"); + blockCompleted = FALSE; [[EMConnectionManager sharedManager] writeValue:[NSNumber numberWithUnsignedChar:(unsigned char)([message length]/MAX_STRING_LENGTH)+1] toResource:@"numPackets" onSuccess:^ { status = TRUE; NSLog(@"[CommunicationProtocol.m]: numPackets set to %d",([message length]/MAX_STRING_LENGTH) + 1); - NSLog(@"[CommunicationProtocol.m]: new status is: %d",status); } onFail:^(NSError *error) { @@ -269,7 +274,7 @@ { status = TRUE; NSLog(@"[CommunicationProtocol.m]: messageAvailableMobile set to TRUE"); - NSLog(@"[CommunicationProtocol.m]: Message written"); + NSLog(@"[CommunicationProtocol.m]: Packet written"); } onFail:^(NSError *error) { @@ -282,7 +287,10 @@ } } } - NSLog(@"[CommunicationProtocol.m]: Device has processed the message"); + if(![self waitForMessageAvailableMobile:FALSE]) + { + NSLog(@"[CommunicationProtocol.m]: Device has processed the message"); + } return status; } @@ -301,7 +309,7 @@ } } NSLog(@"[CommunicationProtocol.m]: Error while establishing connection"); - return TRUE; + return TRUE; //HACK! } -(Boolean) updateTime: (NSDateComponents*) date diff --git a/DUREX Vendor Control/DUREX Vendor Control.xcodeproj/project.pbxproj b/DUREX Vendor Control/DUREX Vendor Control.xcodeproj/project.pbxproj index 4733ccd..bc9f17e 100644 --- a/DUREX Vendor Control/DUREX Vendor Control.xcodeproj/project.pbxproj +++ b/DUREX Vendor Control/DUREX Vendor Control.xcodeproj/project.pbxproj @@ -19,6 +19,9 @@ 34AAB885189804FF0019860D /* EMDevicePickerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34AAB87A189804FF0019860D /* EMDevicePickerViewController.m */; }; 34AAB889189804FF0019860D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 34AAB880189804FF0019860D /* main.m */; }; 34AAB88D189805300019860D /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 34AAB88C189805300019860D /* Images.xcassets */; }; + F933F80419B6819400521B90 /* DatePickerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F933F80219B6819400521B90 /* DatePickerViewController.m */; }; + F933F80519B6819400521B90 /* DatePickerViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F933F80319B6819400521B90 /* DatePickerViewController.xib */; }; + F933F80719B681E000521B90 /* DatePickerViewController_iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = F933F80619B681E000521B90 /* DatePickerViewController_iPad.xib */; }; F961D804199A5F1000E9282C /* MainStoryboard.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F961D806199A5F1000E9282C /* MainStoryboard.storyboard */; }; F961D80C199A5F2D00E9282C /* back_arrow.png in Resources */ = {isa = PBXBuildFile; fileRef = F961D80E199A5F2D00E9282C /* back_arrow.png */; }; F961D816199A5FA000E9282C /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = F961D814199A5FA000E9282C /* Localizable.strings */; }; @@ -72,6 +75,10 @@ 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; }; 34AAB880189804FF0019860D /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = FirstAppExample/main.m; sourceTree = SOURCE_ROOT; }; 34AAB88C189805300019860D /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = FirstAppExample/Images.xcassets; sourceTree = SOURCE_ROOT; }; + F933F80119B6819400521B90 /* DatePickerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DatePickerViewController.h; sourceTree = SOURCE_ROOT; }; + F933F80219B6819400521B90 /* DatePickerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DatePickerViewController.m; sourceTree = SOURCE_ROOT; }; + F933F80319B6819400521B90 /* DatePickerViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DatePickerViewController.xib; sourceTree = SOURCE_ROOT; }; + F933F80619B681E000521B90 /* DatePickerViewController_iPad.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DatePickerViewController_iPad.xib; sourceTree = SOURCE_ROOT; }; F961D807199A5F1800E9282C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/MainStoryboard.storyboard; sourceTree = ""; }; F961D809199A5F2200E9282C /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/MainStoryboard.strings; sourceTree = ""; }; F961D80B199A5F2300E9282C /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/MainStoryboard.strings; sourceTree = ""; }; @@ -167,6 +174,10 @@ F98356DA192EAFD400EA6821 /* CommunicationProtocol.m */, F9A8EF7A192FE201009E7532 /* Stack.h */, F9A8EF7B192FE201009E7532 /* Stack.m */, + F933F80119B6819400521B90 /* DatePickerViewController.h */, + F933F80219B6819400521B90 /* DatePickerViewController.m */, + F933F80319B6819400521B90 /* DatePickerViewController.xib */, + F933F80619B681E000521B90 /* DatePickerViewController_iPad.xib */, 34AAB88C189805300019860D /* Images.xcassets */, 347186B91807290E00FA0FB2 /* Schemas */, 347186A718070F7F00FA0FB2 /* Device Picker */, @@ -316,7 +327,9 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + F933F80519B6819400521B90 /* DatePickerViewController.xib in Resources */, F98356D8192E906600EA6821 /* bluetooth.png in Resources */, + F933F80719B681E000521B90 /* DatePickerViewController_iPad.xib in Resources */, F961D819199A711300E9282C /* EMConnectingView.xib in Resources */, F9C77F50192CDE30002DBE8A /* system.json in Resources */, F961D80C199A5F2D00E9282C /* back_arrow.png in Resources */, @@ -340,6 +353,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + F933F80419B6819400521B90 /* DatePickerViewController.m in Sources */, F98356D6192E835F00EA6821 /* InitialViewController.m in Sources */, F9A8EF7C192FE201009E7532 /* Stack.m in Sources */, 34AAB885189804FF0019860D /* EMDevicePickerViewController.m in Sources */, diff --git a/DUREX Vendor Control/DUREX Vendor Control.xcodeproj/project.xcworkspace/xcuserdata/imanol.xcuserdatad/UserInterfaceState.xcuserstate b/DUREX Vendor Control/DUREX Vendor Control.xcodeproj/project.xcworkspace/xcuserdata/imanol.xcuserdatad/UserInterfaceState.xcuserstate index 44e5a06..de5c75e 100644 Binary files a/DUREX Vendor Control/DUREX Vendor Control.xcodeproj/project.xcworkspace/xcuserdata/imanol.xcuserdatad/UserInterfaceState.xcuserstate and b/DUREX Vendor Control/DUREX Vendor Control.xcodeproj/project.xcworkspace/xcuserdata/imanol.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/DUREX Vendor Control/DUREX Vendor Control.xcodeproj/xcuserdata/imanol.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/DUREX Vendor Control/DUREX Vendor Control.xcodeproj/xcuserdata/imanol.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index 7d891d3..4ccceb2 100644 --- a/DUREX Vendor Control/DUREX Vendor Control.xcodeproj/xcuserdata/imanol.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/DUREX Vendor Control/DUREX Vendor Control.xcodeproj/xcuserdata/imanol.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -10,11 +10,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "CommunicationProtocol.m" - timestampString = "431362674.335425" + timestampString = "431391382.511911" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "110" - endingLineNumber = "110" + startingLineNumber = "109" + endingLineNumber = "109" landmarkName = "-readMessage" landmarkType = "5"> @@ -42,11 +42,11 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "CommunicationProtocol.m" - timestampString = "431362674.335425" + timestampString = "431391382.511911" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "101" - endingLineNumber = "101" + startingLineNumber = "100" + endingLineNumber = "100" landmarkName = "-waitForMessageAvailableDevice:" landmarkType = "5"> @@ -58,30 +58,14 @@ ignoreCount = "0" continueAfterRunningActions = "No" filePath = "CommunicationProtocol.m" - timestampString = "431362674.335425" + timestampString = "431391382.511911" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "105" - endingLineNumber = "105" + startingLineNumber = "104" + endingLineNumber = "104" landmarkName = "-waitForMessageAvailableDevice:" landmarkType = "5"> - - - - diff --git a/DUREX Vendor Control/DatePickerViewController.h b/DUREX Vendor Control/DatePickerViewController.h new file mode 100644 index 0000000..53a5e7f --- /dev/null +++ b/DUREX Vendor Control/DatePickerViewController.h @@ -0,0 +1,29 @@ +// +// DatePickerViewController.h +// DUREX Vendor Control +// +// Created by Imanol Barba on 03/09/14. +// Copyright (c) 2014 Emmoco. All rights reserved. +// + +@class DatePickerViewController; + +#import +#import +#import "DUREXAppDelegate.h" + +@protocol DatePickerViewControllerDelegate +- (void)addItemViewController:(DatePickerViewController*)controller didFinishEnteringItem:(NSDate *)date; + +@end + +@interface DatePickerViewController : UIViewController + +@property (strong, nonatomic) IBOutlet UIView *datePickerView; +@property (strong, nonatomic) IBOutlet UIDatePicker *datePicker; +@property (nonatomic, strong) id delegate; + +- (void)showInView:(UIView *)aView animated:(BOOL)animated; +- (IBAction)closePopup:(id)sender; + +@end diff --git a/DUREX Vendor Control/DatePickerViewController.m b/DUREX Vendor Control/DatePickerViewController.m new file mode 100644 index 0000000..fb33999 --- /dev/null +++ b/DUREX Vendor Control/DatePickerViewController.m @@ -0,0 +1,78 @@ +// +// DatePickerViewController.m +// DUREX Vendor Control +// +// Created by Imanol Barba on 03/09/14. +// Copyright (c) 2014 Emmoco. All rights reserved. +// + +#import "DatePickerViewController.h" + +@interface DatePickerViewController () + +@end + +@implementation DatePickerViewController + +- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil +{ + self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; + if (self) { + // Custom initialization + } + return self; +} + +- (void)viewDidLoad +{ + self.view.backgroundColor=[[UIColor blackColor] colorWithAlphaComponent:.7]; + self.datePickerView.layer.cornerRadius = 5; + self.datePickerView.layer.shadowOpacity = 0.8; + self.datePickerView.layer.shadowOffset = CGSizeMake(0.0f, 0.0f); + [super viewDidLoad]; + // Do any additional setup after loading the view from its nib. +} + +- (void)didReceiveMemoryWarning +{ + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +- (void)showAnimate +{ + self.view.transform = CGAffineTransformMakeScale(1.3, 1.3); + self.view.alpha = 0; + [UIView animateWithDuration:.25 animations:^{ + self.view.alpha = 1; + self.view.transform = CGAffineTransformMakeScale(1, 1); + }]; +} + +- (void)removeAnimate +{ + [UIView animateWithDuration:.25 animations:^{ + self.view.transform = CGAffineTransformMakeScale(1.3, 1.3); + self.view.alpha = 0.0; + } completion:^(BOOL finished) { + if (finished) { + [self.view removeFromSuperview]; + } + }]; +} + +- (IBAction)closePopup:(id)sender +{ + [self.delegate addItemViewController:self didFinishEnteringItem:[[self datePicker] date]]; + [self removeAnimate]; +} + +- (void)showInView:(UIView *)aView animated:(BOOL)animated +{ + [aView addSubview:self.view]; + if (animated) { + [self showAnimate]; + } +} + +@end diff --git a/DUREX Vendor Control/DatePickerViewController.xib b/DUREX Vendor Control/DatePickerViewController.xib new file mode 100644 index 0000000..d4fa1c2 --- /dev/null +++ b/DUREX Vendor Control/DatePickerViewController.xib @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +VFppZgAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAC5AAAABAAAABCepkign7sVkKCGKqChmveQ +y4kaoNIj9HDSYSYQ1v50INiArZDa/tGg28CQENzes6DdqayQ3r6VoN+JjpDgnneg4WlwkOJ+WaDjSVKQ +5F47oOUpNJDmR1gg5xJREOgnOiDo8jMQ6gccIOrSFRDr5v4g7LH3EO3G4CDukdkQ76/8oPBxuxDxj96g +8n/BkPNvwKD0X6OQ9U+ioPY/hZD3L4Sg+CiiEPkPZqD6CIQQ+viDIPvoZhD82GUg/chIEP64RyD/qCoQ +AJgpIAGIDBACeAsgA3EokARhJ6AFUQqQBkEJoAcw7JAHjUOgCRDOkAmtvyAK8LCQC+CvoAzZzRANwJGg +DrmvEA+priAQmZEQEYmQIBJ5cxATaXIgFFlVEBVJVCAWOTcQFyk2IBgiU5AZCRggGgI1kBryNKAb4heQ +HNIWoB3B+ZAesfigH6HbkCB2KyAhgb2QIlYNICNq2hAkNe8gJUq8ECYV0SAnKp4QJ/7toCkKgBAp3s+g +KupiECu+saAs036QLZ6ToC6zYJAvfnWgMJNCkDFnkiAycySQM0d0IDRTBpA1J1YgNjLokDcHOCA4HAUQ +OOcaIDn75xA6xvwgO9vJEDywGKA9u6sQPo/6oD+bjRBAb9ygQYSpkEJPvqBDZIuQRC+goEVEbZBF89Mg +Ry2KEEfTtSBJDWwQSbOXIErtThBLnLOgTNZqkE18laBOtkyQT1x3oFCWLpBRPFmgUnYQkFMcO6BUVfKQ +VPwdoFY11JBW5TogWB7xEFjFHCBZ/tMQWqT+IFvetRBchOAgXb6XEF5kwiBfnnkQYE3eoGGHlZBiLcCg +Y2d3kGQNoqBlR1mQZe2EoGcnO5BnzWagaQcdkGmtSKBq5v+Qa5ZlIGzQHBBtdkcgbq/+EG9WKSBwj+AQ +cTYLIHJvwhBzFe0gdE+kEHT/CaB2OMCQdt7roHgYopB4vs2gefiEkHqer6B72GaQfH6RoH24SJB+XnOg +f5gqkAABAAECAwEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA +AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA +AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA +AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA + + + + + + + + + + + + + + + + + + diff --git a/DUREX Vendor Control/DatePickerViewController_iPad.xib b/DUREX Vendor Control/DatePickerViewController_iPad.xib new file mode 100644 index 0000000..74375da --- /dev/null +++ b/DUREX Vendor Control/DatePickerViewController_iPad.xib @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +VFppZgAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAC5AAAABAAAABCepkign7sVkKCGKqChmveQ +y4kaoNIj9HDSYSYQ1v50INiArZDa/tGg28CQENzes6DdqayQ3r6VoN+JjpDgnneg4WlwkOJ+WaDjSVKQ +5F47oOUpNJDmR1gg5xJREOgnOiDo8jMQ6gccIOrSFRDr5v4g7LH3EO3G4CDukdkQ76/8oPBxuxDxj96g +8n/BkPNvwKD0X6OQ9U+ioPY/hZD3L4Sg+CiiEPkPZqD6CIQQ+viDIPvoZhD82GUg/chIEP64RyD/qCoQ +AJgpIAGIDBACeAsgA3EokARhJ6AFUQqQBkEJoAcw7JAHjUOgCRDOkAmtvyAK8LCQC+CvoAzZzRANwJGg +DrmvEA+priAQmZEQEYmQIBJ5cxATaXIgFFlVEBVJVCAWOTcQFyk2IBgiU5AZCRggGgI1kBryNKAb4heQ +HNIWoB3B+ZAesfigH6HbkCB2KyAhgb2QIlYNICNq2hAkNe8gJUq8ECYV0SAnKp4QJ/7toCkKgBAp3s+g +KupiECu+saAs036QLZ6ToC6zYJAvfnWgMJNCkDFnkiAycySQM0d0IDRTBpA1J1YgNjLokDcHOCA4HAUQ +OOcaIDn75xA6xvwgO9vJEDywGKA9u6sQPo/6oD+bjRBAb9ygQYSpkEJPvqBDZIuQRC+goEVEbZBF89Mg +Ry2KEEfTtSBJDWwQSbOXIErtThBLnLOgTNZqkE18laBOtkyQT1x3oFCWLpBRPFmgUnYQkFMcO6BUVfKQ +VPwdoFY11JBW5TogWB7xEFjFHCBZ/tMQWqT+IFvetRBchOAgXb6XEF5kwiBfnnkQYE3eoGGHlZBiLcCg +Y2d3kGQNoqBlR1mQZe2EoGcnO5BnzWagaQcdkGmtSKBq5v+Qa5ZlIGzQHBBtdkcgbq/+EG9WKSBwj+AQ +cTYLIHJvwhBzFe0gdE+kEHT/CaB2OMCQdt7roHgYopB4vs2gefiEkHqer6B72GaQfH6RoH24SJB+XnOg +f5gqkAABAAECAwEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA +AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA +AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA +AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA + + + + + + + + + + + + + + + + + + + + + diff --git a/DUREX Vendor Control/FirstAppExample/Base.lproj/MainStoryboard.storyboard b/DUREX Vendor Control/FirstAppExample/Base.lproj/MainStoryboard.storyboard index 0fd2d54..373c413 100644 --- a/DUREX Vendor Control/FirstAppExample/Base.lproj/MainStoryboard.storyboard +++ b/DUREX Vendor Control/FirstAppExample/Base.lproj/MainStoryboard.storyboard @@ -1,5 +1,5 @@ - + @@ -201,9 +201,13 @@ - - - - - - - - - + + + + + + + + + VFppZgAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAC5AAAABAAAABCepkign7sVkKCGKqChmveQ y4kaoNIj9HDSYSYQ1v50INiArZDa/tGg28CQENzes6DdqayQ3r6VoN+JjpDgnneg4WlwkOJ+WaDjSVKQ 5F47oOUpNJDmR1gg5xJREOgnOiDo8jMQ6gccIOrSFRDr5v4g7LH3EO3G4CDukdkQ76/8oPBxuxDxj96g @@ -51,16 +45,28 @@ f5gqkAABAAECAwEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA - - - + + + + + + + + + + + - - - - - - + diff --git a/DUREX tests/Base.lproj/DatePickerViewController_iPad.xib b/DUREX tests/Base.lproj/DatePickerViewController_iPad.xib index acbd686..74c0762 100644 --- a/DUREX tests/Base.lproj/DatePickerViewController_iPad.xib +++ b/DUREX tests/Base.lproj/DatePickerViewController_iPad.xib @@ -1,13 +1,13 @@ - + - + - + @@ -16,14 +16,18 @@ - - - - - - - - + + + + + + + + + + + + VFppZgAAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAC5AAAABAAAABCepkign7sVkKCGKqChmveQ y4kaoNIj9HDSYSYQ1v50INiArZDa/tGg28CQENzes6DdqayQ3r6VoN+JjpDgnneg4WlwkOJ+WaDjSVKQ 5F47oOUpNJDmR1gg5xJREOgnOiDo8jMQ6gccIOrSFRDr5v4g7LH3EO3G4CDukdkQ76/8oPBxuxDxj96g @@ -41,25 +45,31 @@ f5gqkAABAAECAwEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA AQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEA AQABAAEAAQAB//+dkAEA//+PgAAE//+dkAEI//+dkAEMUERUAFBTVABQV1QAUFBUAAAAAAEAAAABA - - - - + + + + + + + + + + + - + - - - + + diff --git a/DUREX tests/Base.lproj/MainStoryboard.storyboard b/DUREX tests/Base.lproj/MainStoryboard.storyboard index bb41308..9f0a6e4 100644 --- a/DUREX tests/Base.lproj/MainStoryboard.storyboard +++ b/DUREX tests/Base.lproj/MainStoryboard.storyboard @@ -1,5 +1,5 @@ - + diff --git a/DUREX tests/DUREX test.xcodeproj/project.pbxproj b/DUREX tests/DUREX test.xcodeproj/project.pbxproj index 82b096e..717a4ca 100644 --- a/DUREX tests/DUREX test.xcodeproj/project.pbxproj +++ b/DUREX tests/DUREX test.xcodeproj/project.pbxproj @@ -31,7 +31,6 @@ F98ACEDC19B6294E00D90AEE /* DatePickerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = F98ACEDA19B6294E00D90AEE /* DatePickerViewController.m */; }; F9AB5A6F19B63931006785E4 /* DatePickerViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = F9AB5A7119B63931006785E4 /* DatePickerViewController.xib */; }; F9AB5A7219B63938006785E4 /* DatePickerViewController_iPad.xib in Resources */ = {isa = PBXBuildFile; fileRef = F9AB5A7419B63938006785E4 /* DatePickerViewController_iPad.xib */; }; - F9C77F50192CDE30002DBE8A /* durex.json in Resources */ = {isa = PBXBuildFile; fileRef = F9C77F4F192CDE30002DBE8A /* durex.json */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -88,7 +87,6 @@ F9AB5A7819B6393D006785E4 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/DatePickerViewController.strings; sourceTree = ""; }; F9AB5A7A19B6393F006785E4 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/DatePickerViewController_iPad.strings; sourceTree = ""; }; F9AB5A7C19B63940006785E4 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/DatePickerViewController_iPad.strings; sourceTree = ""; }; - F9C77F4F192CDE30002DBE8A /* durex.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = durex.json; sourceTree = SOURCE_ROOT; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -208,7 +206,6 @@ 347186B91807290E00FA0FB2 /* Schemas */ = { isa = PBXGroup; children = ( - F9C77F4F192CDE30002DBE8A /* durex.json */, ); name = Schemas; sourceTree = ""; @@ -292,7 +289,6 @@ buildActionMask = 2147483647; files = ( F98356D8192E906600EA6821 /* bluetooth.png in Resources */, - F9C77F50192CDE30002DBE8A /* durex.json in Resources */, F9AB5A6F19B63931006785E4 /* DatePickerViewController.xib in Resources */, 34AAB88D189805300019860D /* Images.xcassets in Resources */, F92B0B6C19993D3F00CAEF3E /* Localizable.strings in Resources */, diff --git a/DUREX tests/DUREX test.xcodeproj/project.xcworkspace/xcuserdata/imanol.xcuserdatad/UserInterfaceState.xcuserstate b/DUREX tests/DUREX test.xcodeproj/project.xcworkspace/xcuserdata/imanol.xcuserdatad/UserInterfaceState.xcuserstate index c31975e..961ac2a 100644 Binary files a/DUREX tests/DUREX test.xcodeproj/project.xcworkspace/xcuserdata/imanol.xcuserdatad/UserInterfaceState.xcuserstate and b/DUREX tests/DUREX test.xcodeproj/project.xcworkspace/xcuserdata/imanol.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/DUREX tests/DatePickerViewController.m b/DUREX tests/DatePickerViewController.m index bcffd2c..b666603 100644 --- a/DUREX tests/DatePickerViewController.m +++ b/DUREX tests/DatePickerViewController.m @@ -25,7 +25,6 @@ - (void)viewDidLoad { - self.view.backgroundColor=[[UIColor blackColor] colorWithAlphaComponent:.6]; self.datePickerView.layer.cornerRadius = 5; self.datePickerView.layer.shadowOpacity = 0.8; self.datePickerView.layer.shadowOffset = CGSizeMake(0.0f, 0.0f); diff --git a/DUREX tests/MenuTableViewController.m b/DUREX tests/MenuTableViewController.m index 1587b1a..81ce799 100644 --- a/DUREX tests/MenuTableViewController.m +++ b/DUREX tests/MenuTableViewController.m @@ -270,12 +270,15 @@ { if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { + //self.popupViewController = [[DatePickerViewController alloc] initWithNibName:@"DatePickerViewController_iPad" bundle:nil]; self.popupViewController = [[DatePickerViewController alloc] initWithNibName:@"DatePickerViewController_iPad" bundle:nil]; + self.popupViewController.delegate = self; [self.popupViewController showInView:self.navigationController.view animated:YES]; } else { self.popupViewController = [[DatePickerViewController alloc] initWithNibName:@"DatePickerViewController" bundle:nil]; + self.popupViewController.delegate = self; [self.popupViewController showInView:self.navigationController.view animated:YES]; } } @@ -351,7 +354,8 @@ NSCalendar *calendar = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; NSCalendarUnit units = NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit | NSHourCalendarUnit | NSMinuteCalendarUnit | NSSecondCalendarUnit; NSDateComponents *components = [calendar components:units fromDate:date]; - [_protocol updateTime: components]; + NSLog(@"[MenuTableViewController.m]: %@", components); + //[_protocol updateTime: components]; } -- libgit2 0.22.2