From bfc9fd8ed0d2042c3c3a66848514d7ec37610f91 Mon Sep 17 00:00:00 2001 From: rpechayr Date: Mon, 15 Nov 2010 15:43:18 +0000 Subject: [PATCH] [iphone/Barcodes] About View is now fully functional git-svn-id: https://zxing.googlecode.com/svn/trunk@1653 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- .../Barcodes/Classes/MessageViewController.h | 9 +- .../Barcodes/Classes/MessageViewController.m | 6 + .../Barcodes/Classes/ZXMainViewController.h | 5 +- .../Barcodes/Classes/ZXMainViewController.mm | 6 +- iphone/Barcodes/de.lproj/About.html | 2 +- iphone/Barcodes/de.lproj/Message.xib | 270 ++++++++++++++---- iphone/Barcodes/en.lproj/About.html | 2 +- iphone/Barcodes/en.lproj/Message.xib | 127 +++++--- iphone/Barcodes/sv.lproj/About.html | 2 +- iphone/Barcodes/sv.lproj/Message.xib | 270 ++++++++++++++---- 10 files changed, 554 insertions(+), 145 deletions(-) diff --git a/iphone/Barcodes/Classes/MessageViewController.h b/iphone/Barcodes/Classes/MessageViewController.h index 6131d3b60..a1a7be3d8 100644 --- a/iphone/Barcodes/Classes/MessageViewController.h +++ b/iphone/Barcodes/Classes/MessageViewController.h @@ -20,6 +20,11 @@ */ #import +@class MessageViewController; + +@protocol MessageViewControllerDelegate +- (void)messageViewControllerWantsToBeDispissed:(MessageViewController *)controller; +@end @interface MessageViewController : UIViewController { // id callbackTarget; @@ -27,6 +32,7 @@ // SEL callbackSelectorFailure; NSURL *contentURL; IBOutlet UIWebView *webView; + id delegate; } //@property (nonatomic, retain) id callbackTarget; @@ -34,9 +40,10 @@ //@property (nonatomic, assign) SEL callbackSelectorFailure; @property (nonatomic,retain) IBOutlet UIWebView *webView; - +@property (nonatomic,assign) id delegate; @property (nonatomic, retain) NSURL *contentURL; - (id)initWithMessageFilename:(NSString *)filename; +- (IBAction)dismiss:(id)sender; @end diff --git a/iphone/Barcodes/Classes/MessageViewController.m b/iphone/Barcodes/Classes/MessageViewController.m index 3d64613fb..47741ecbd 100644 --- a/iphone/Barcodes/Classes/MessageViewController.m +++ b/iphone/Barcodes/Classes/MessageViewController.m @@ -29,6 +29,7 @@ //@synthesize callbackSelectorFailure; @synthesize contentURL; @synthesize webView; +@synthesize delegate; //- (UIWebView *)webView { // return (UIWebView *)self.view; @@ -42,6 +43,10 @@ return self; } +- (IBAction)dismiss:(id)sender { + [delegate messageViewControllerWantsToBeDispissed:self]; +} + - (void)loadView { [super loadView]; self.webView.delegate = self; @@ -65,6 +70,7 @@ - (void)dealloc { + delegate = nil; [webView release]; [super dealloc]; } diff --git a/iphone/Barcodes/Classes/ZXMainViewController.h b/iphone/Barcodes/Classes/ZXMainViewController.h index ce4b062d6..cf948a345 100644 --- a/iphone/Barcodes/Classes/ZXMainViewController.h +++ b/iphone/Barcodes/Classes/ZXMainViewController.h @@ -8,10 +8,13 @@ #import #import "ZXingWidgetController.h" +#import "MessageViewController.h" + @class UniversalResultParser; @class ParsedResult; -@interface ZXMainViewController : UIViewController { + +@interface ZXMainViewController : UIViewController { UniversalResultParser *resultParser; NSArray *actions; ParsedResult *result; diff --git a/iphone/Barcodes/Classes/ZXMainViewController.mm b/iphone/Barcodes/Classes/ZXMainViewController.mm index 96cb5d8d2..3c2a5f408 100644 --- a/iphone/Barcodes/Classes/ZXMainViewController.mm +++ b/iphone/Barcodes/Classes/ZXMainViewController.mm @@ -11,7 +11,6 @@ #import #import #import -#import "MessageViewController.h" @implementation ZXMainViewController @synthesize resultParser; @@ -80,10 +79,15 @@ /* target:self onSuccess:@selector(messageReady:) onFailure:@selector(messageFailed:)*/]; + aboutController.delegate = self; [self presentModalViewController:aboutController animated:YES]; [aboutController release]; } +- (void)messageViewControllerWantsToBeDispissed:(MessageViewController *)controller { + [self dismissModalViewControllerAnimated:YES]; +} + - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; diff --git a/iphone/Barcodes/de.lproj/About.html b/iphone/Barcodes/de.lproj/About.html index 2b0cfdde6..14ce82ddf 100644 --- a/iphone/Barcodes/de.lproj/About.html +++ b/iphone/Barcodes/de.lproj/About.html @@ -10,7 +10,7 @@

ZXing Project Logo

Strichcodes

-

Version 1.1

+

Version 2.0

© 2008-2010 The ZXing Authors

diff --git a/iphone/Barcodes/de.lproj/Message.xib b/iphone/Barcodes/de.lproj/Message.xib index cd06af12c..0523bd55b 100644 --- a/iphone/Barcodes/de.lproj/Message.xib +++ b/iphone/Barcodes/de.lproj/Message.xib @@ -2,16 +2,17 @@ 768 - 10D573 - 762 - 1038.29 - 460.00 + 10H542 + 823 + 1038.35 + 461.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 87 + 132 YES + YES @@ -36,18 +37,57 @@ IBFirstResponder IBCocoaTouchFramework - - - 274 + + + 292 + + YES + + + 290 + {320, 44} + + IBCocoaTouchFramework + + YES + + + + + Done + IBCocoaTouchFramework + 1 + + + IBCocoaTouchFramework + + + + + + 274 + {{0, 44}, {320, 416}} + + + 1 + MSAxIDEAA + + YES + IBCocoaTouchFramework + 1 + YES + + {320, 460} + 3 - MAA + MQA + + 2 + - YES - YES IBCocoaTouchFramework - YES @@ -57,9 +97,25 @@ view - + - 5 + 13 + + + + webView + + + + 17 + + + + dismiss: + + + + 19 @@ -83,10 +139,43 @@ - 4 - + 12 + + + YES + + + + + 14 + + + YES + + + + + + 15 + + + YES + + + + + + 16 + + + + + 18 + + + @@ -95,12 +184,26 @@ YES -1.CustomClassName -2.CustomClassName - 4.IBPluginDependency + 12.IBEditorWindowLastContentRect + 12.IBPluginDependency + 14.IBPluginDependency + 14.IBViewBoundsToFrameTransform + 15.IBPluginDependency + 16.IBPluginDependency + 18.IBPluginDependency YES MessageViewController UIResponder + {{1, 53}, {320, 460}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAAAAAAAAwigAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -120,7 +223,7 @@ - 5 + 19 @@ -128,10 +231,49 @@ MessageViewController UIViewController - - callbackTarget + + dismiss: id + + dismiss: + + dismiss: + id + + + + YES + + YES + delegate + webView + + + YES + id + UIWebView + + + + YES + + YES + delegate + webView + + + YES + + delegate + id + + + webView + UIWebView + + + IBProjectSource Classes/MessageViewController.h @@ -175,13 +317,6 @@ Foundation.framework/Headers/NSKeyedArchiver.h - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSNetServices.h - - NSObject @@ -189,13 +324,6 @@ Foundation.framework/Headers/NSObject.h - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSPort.h - - NSObject @@ -203,13 +331,6 @@ Foundation.framework/Headers/NSRunLoop.h - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSStream.h - - NSObject @@ -231,13 +352,6 @@ Foundation.framework/Headers/NSURLConnection.h - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSXMLParser.h - - NSObject @@ -254,15 +368,44 @@ NSObject - + IBFrameworkSource UIKit.framework/Headers/UIResponder.h + + UIBarButtonItem + UIBarItem + + IBFrameworkSource + UIKit.framework/Headers/UIBarButtonItem.h + + + + UIBarItem + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIBarItem.h + + + + UINavigationBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UINavigationBar.h + + + + UINavigationItem + NSObject + + UIResponder NSObject - + UISearchBar @@ -280,6 +423,13 @@ UIKit.framework/Headers/UISearchDisplayController.h + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIPrintFormatter.h + + UIView @@ -302,6 +452,20 @@ UIKit.framework/Headers/UINavigationController.h + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UIPopoverController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UISplitViewController.h + + UIViewController @@ -335,15 +499,15 @@ com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 YES - ../ZXing.xcodeproj + ../Barcodes.xcodeproj 3 - 87 + 132 diff --git a/iphone/Barcodes/en.lproj/About.html b/iphone/Barcodes/en.lproj/About.html index f6dcba1a8..bc1dc4a41 100644 --- a/iphone/Barcodes/en.lproj/About.html +++ b/iphone/Barcodes/en.lproj/About.html @@ -10,7 +10,7 @@

ZXing Project Logo

Barcodes

-

Version 1.1

+

Version 2.0

© 2008-2010 The ZXing Authors

diff --git a/iphone/Barcodes/en.lproj/Message.xib b/iphone/Barcodes/en.lproj/Message.xib index adabe18d2..0523bd55b 100644 --- a/iphone/Barcodes/en.lproj/Message.xib +++ b/iphone/Barcodes/en.lproj/Message.xib @@ -12,7 +12,7 @@
YES - + YES @@ -37,31 +37,37 @@ IBFirstResponder IBCocoaTouchFramework - + 292 YES - - + + 290 {320, 44} - + IBCocoaTouchFramework YES - - - Title + + + + + Done + IBCocoaTouchFramework + 1 + + IBCocoaTouchFramework - - + + 274 {{0, 44}, {320, 416}} - + 1 MSAxIDEAA @@ -91,7 +97,7 @@ view - + 13 @@ -99,10 +105,18 @@ webView - + 17 + + + dismiss: + + + + 19 + @@ -126,32 +140,41 @@ 12 - + YES - - + + 14 - + YES - + - + 15 - - + + + YES + + + 16 - - + + + + + 18 + + @@ -164,16 +187,22 @@ 12.IBEditorWindowLastContentRect 12.IBPluginDependency 14.IBPluginDependency + 14.IBViewBoundsToFrameTransform 15.IBPluginDependency 16.IBPluginDependency + 18.IBPluginDependency YES MessageViewController UIResponder - {{295, 243}, {320, 460}} + {{1, 53}, {320, 460}} com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAAAAAAAAwigAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin @@ -194,7 +223,7 @@ - 17 + 19 @@ -202,15 +231,47 @@ MessageViewController UIViewController + + dismiss: + id + + + dismiss: + + dismiss: + id + + - webView - UIWebView + YES + + YES + delegate + webView + + + YES + id + UIWebView + - webView - - webView - UIWebView + YES + + YES + delegate + webView + + + YES + + delegate + id + + + webView + UIWebView + @@ -331,7 +392,7 @@ UINavigationBar UIView - + IBFrameworkSource UIKit.framework/Headers/UINavigationBar.h @@ -339,7 +400,7 @@ UINavigationItem NSObject - + UIResponder diff --git a/iphone/Barcodes/sv.lproj/About.html b/iphone/Barcodes/sv.lproj/About.html index 37b8cf524..7093b45e1 100644 --- a/iphone/Barcodes/sv.lproj/About.html +++ b/iphone/Barcodes/sv.lproj/About.html @@ -10,7 +10,7 @@

ZXing Project Logo

Streckkoder

-

Version 1.1

+

Version 2.0

© 2008-2010 The ZXing Authors

diff --git a/iphone/Barcodes/sv.lproj/Message.xib b/iphone/Barcodes/sv.lproj/Message.xib index d85b217ee..0523bd55b 100644 --- a/iphone/Barcodes/sv.lproj/Message.xib +++ b/iphone/Barcodes/sv.lproj/Message.xib @@ -2,16 +2,17 @@ 768 - 10D573 - 762 - 1038.29 - 460.00 + 10H542 + 823 + 1038.35 + 461.00 com.apple.InterfaceBuilder.IBCocoaTouchPlugin - 87 + 132 YES + YES @@ -36,18 +37,57 @@ IBFirstResponder IBCocoaTouchFramework - - - 274 + + + 292 + + YES + + + 290 + {320, 44} + + IBCocoaTouchFramework + + YES + + + + + Done + IBCocoaTouchFramework + 1 + + + IBCocoaTouchFramework + + + + + + 274 + {{0, 44}, {320, 416}} + + + 1 + MSAxIDEAA + + YES + IBCocoaTouchFramework + 1 + YES + + {320, 460} + 3 - MAA + MQA + + 2 + - YES - YES IBCocoaTouchFramework - YES @@ -57,9 +97,25 @@ view - + - 5 + 13 + + + + webView + + + + 17 + + + + dismiss: + + + + 19
@@ -83,10 +139,43 @@ - 4 - + 12 + + + YES + + + + + 14 + + + YES + + + + + + 15 + + + YES + + + + + + 16 + + + + + 18 + + +
@@ -95,12 +184,26 @@ YES -1.CustomClassName -2.CustomClassName - 4.IBPluginDependency + 12.IBEditorWindowLastContentRect + 12.IBPluginDependency + 14.IBPluginDependency + 14.IBViewBoundsToFrameTransform + 15.IBPluginDependency + 16.IBPluginDependency + 18.IBPluginDependency YES MessageViewController UIResponder + {{1, 53}, {320, 460}} + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + + P4AAAL+AAAAAAAAAwigAAA + + com.apple.InterfaceBuilder.IBCocoaTouchPlugin + com.apple.InterfaceBuilder.IBCocoaTouchPlugin com.apple.InterfaceBuilder.IBCocoaTouchPlugin
@@ -120,7 +223,7 @@
- 5 + 19
@@ -128,10 +231,49 @@ MessageViewController UIViewController - - callbackTarget + + dismiss: id + + dismiss: + + dismiss: + id + + + + YES + + YES + delegate + webView + + + YES + id + UIWebView + + + + YES + + YES + delegate + webView + + + YES + + delegate + id + + + webView + UIWebView + + + IBProjectSource Classes/MessageViewController.h @@ -175,13 +317,6 @@ Foundation.framework/Headers/NSKeyedArchiver.h - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSNetServices.h - - NSObject @@ -189,13 +324,6 @@ Foundation.framework/Headers/NSObject.h - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSPort.h - - NSObject @@ -203,13 +331,6 @@ Foundation.framework/Headers/NSRunLoop.h - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSStream.h - - NSObject @@ -231,13 +352,6 @@ Foundation.framework/Headers/NSURLConnection.h - - NSObject - - IBFrameworkSource - Foundation.framework/Headers/NSXMLParser.h - - NSObject @@ -254,15 +368,44 @@ NSObject - + IBFrameworkSource UIKit.framework/Headers/UIResponder.h + + UIBarButtonItem + UIBarItem + + IBFrameworkSource + UIKit.framework/Headers/UIBarButtonItem.h + + + + UIBarItem + NSObject + + IBFrameworkSource + UIKit.framework/Headers/UIBarItem.h + + + + UINavigationBar + UIView + + IBFrameworkSource + UIKit.framework/Headers/UINavigationBar.h + + + + UINavigationItem + NSObject + + UIResponder NSObject - + UISearchBar @@ -280,6 +423,13 @@ UIKit.framework/Headers/UISearchDisplayController.h + + UIView + + IBFrameworkSource + UIKit.framework/Headers/UIPrintFormatter.h + + UIView @@ -302,6 +452,20 @@ UIKit.framework/Headers/UINavigationController.h + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UIPopoverController.h + + + + UIViewController + + IBFrameworkSource + UIKit.framework/Headers/UISplitViewController.h + + UIViewController @@ -335,15 +499,15 @@ com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS - + com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3 YES - ../ZXing.xcodeproj + ../Barcodes.xcodeproj 3 - 87 + 132