From a16084242c5f5cde35406c96a4db82781c28ce6c Mon Sep 17 00:00:00 2001 From: "christian.brunschen" Date: Thu, 14 Aug 2008 12:49:52 +0000 Subject: [PATCH] Added version number and list of supported barcode format(s) in About screen. Cleaned up MessageViewController's loading of data. git-svn-id: https://zxing.googlecode.com/svn/trunk@563 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- iphone/Classes/MessageViewController.h | 4 ---- iphone/Classes/MessageViewController.m | 16 ++++++---------- iphone/de.lproj/About.html | 9 ++++++++- iphone/en.lproj/About.html | 9 ++++++++- iphone/sv.lproj/About.html | 9 ++++++++- 5 files changed, 30 insertions(+), 17 deletions(-) diff --git a/iphone/Classes/MessageViewController.h b/iphone/Classes/MessageViewController.h index b74d1dcc7..348d0a44d 100644 --- a/iphone/Classes/MessageViewController.h +++ b/iphone/Classes/MessageViewController.h @@ -25,9 +25,7 @@ id callbackTarget; SEL callbackSelectorSuccess; SEL callbackSelectorFailure; - NSString *contentPath; NSURL *contentURL; - NSString *content; } @property (nonatomic, retain) id callbackTarget; @@ -36,9 +34,7 @@ @property (nonatomic, readonly) UIWebView *webView; -@property (nonatomic, copy) NSString *contentPath; @property (nonatomic, retain) NSURL *contentURL; -@property (nonatomic, copy) NSString *content; - (id)initWithMessageFilename:(NSString *)filename target:(id)cbt onSuccess:(SEL)ss onFailure:(SEL)fs; diff --git a/iphone/Classes/MessageViewController.m b/iphone/Classes/MessageViewController.m index 9380ce59a..ab6b2bc58 100644 --- a/iphone/Classes/MessageViewController.m +++ b/iphone/Classes/MessageViewController.m @@ -27,26 +27,22 @@ @synthesize callbackTarget; @synthesize callbackSelectorSuccess; @synthesize callbackSelectorFailure; -@synthesize contentPath; @synthesize contentURL; -@synthesize content; - (UIWebView *)webView { return (UIWebView *)self.view; } - (id)initWithMessageFilename:(NSString *)filename - target:(id)cbt onSuccess:(SEL)ss onFailure:(SEL)fs { + target:(id)cbt + onSuccess:(SEL)ss + onFailure:(SEL)fs { if (self = [super initWithNibName:@"Message" bundle:nil]) { self.callbackTarget = cbt; self.callbackSelectorSuccess = ss; self.callbackSelectorFailure = fs; - self.contentPath = [[NSBundle mainBundle] pathForResource:filename - ofType:@"html"]; - self.contentURL = [NSURL fileURLWithPath:self.contentPath]; - self.content = [NSString stringWithContentsOfFile:self.contentPath - encoding:NSUTF8StringEncoding - error:NULL]; + self.contentURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:filename + ofType:@"html"]]; } return self; } @@ -54,7 +50,7 @@ - (void)loadView { [super loadView]; self.webView.delegate = self; - [self.webView loadHTMLString:self.content baseURL:self.contentURL]; + [self.webView loadRequest:[NSURLRequest requestWithURL:self.contentURL]]; } - (void)viewDidLoad { diff --git a/iphone/de.lproj/About.html b/iphone/de.lproj/About.html index 6d00279f4..f55c2ad75 100644 --- a/iphone/de.lproj/About.html +++ b/iphone/de.lproj/About.html @@ -9,8 +9,15 @@

ZXing Project Logo

-

Strichcodes

+

Strichcodes

+

Version 1.0

© 2008 The ZXing Authors

+

+Unterstützte Strichcode-Formate: +

+

+QR Code
+

\ No newline at end of file diff --git a/iphone/en.lproj/About.html b/iphone/en.lproj/About.html index f6d86e723..8980ac5f5 100644 --- a/iphone/en.lproj/About.html +++ b/iphone/en.lproj/About.html @@ -9,8 +9,15 @@

ZXing Project Logo

-

Barcodes

+

Barcodes

+

Version 1.0

© 2008 The ZXing Authors

+

+Supported barcode formats: +

+

+QR Code
+

\ No newline at end of file diff --git a/iphone/sv.lproj/About.html b/iphone/sv.lproj/About.html index 8bda11200..1fd62192b 100644 --- a/iphone/sv.lproj/About.html +++ b/iphone/sv.lproj/About.html @@ -9,8 +9,15 @@

ZXing Project Logo

-

Streckkoder

+

Streckkoder

+

Version 1.0

© 2008 The ZXing Authors

+

+Stödda streckkods-format: +

+

+QR Code
+

\ No newline at end of file