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
This commit is contained in:
christian.brunschen 2008-08-14 12:49:52 +00:00
parent 8d90db8c1c
commit a16084242c
5 changed files with 30 additions and 17 deletions

View file

@ -25,9 +25,7 @@
id callbackTarget; id callbackTarget;
SEL callbackSelectorSuccess; SEL callbackSelectorSuccess;
SEL callbackSelectorFailure; SEL callbackSelectorFailure;
NSString *contentPath;
NSURL *contentURL; NSURL *contentURL;
NSString *content;
} }
@property (nonatomic, retain) id callbackTarget; @property (nonatomic, retain) id callbackTarget;
@ -36,9 +34,7 @@
@property (nonatomic, readonly) UIWebView *webView; @property (nonatomic, readonly) UIWebView *webView;
@property (nonatomic, copy) NSString *contentPath;
@property (nonatomic, retain) NSURL *contentURL; @property (nonatomic, retain) NSURL *contentURL;
@property (nonatomic, copy) NSString *content;
- (id)initWithMessageFilename:(NSString *)filename target:(id)cbt onSuccess:(SEL)ss onFailure:(SEL)fs; - (id)initWithMessageFilename:(NSString *)filename target:(id)cbt onSuccess:(SEL)ss onFailure:(SEL)fs;

View file

@ -27,26 +27,22 @@
@synthesize callbackTarget; @synthesize callbackTarget;
@synthesize callbackSelectorSuccess; @synthesize callbackSelectorSuccess;
@synthesize callbackSelectorFailure; @synthesize callbackSelectorFailure;
@synthesize contentPath;
@synthesize contentURL; @synthesize contentURL;
@synthesize content;
- (UIWebView *)webView { - (UIWebView *)webView {
return (UIWebView *)self.view; return (UIWebView *)self.view;
} }
- (id)initWithMessageFilename:(NSString *)filename - (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]) { if (self = [super initWithNibName:@"Message" bundle:nil]) {
self.callbackTarget = cbt; self.callbackTarget = cbt;
self.callbackSelectorSuccess = ss; self.callbackSelectorSuccess = ss;
self.callbackSelectorFailure = fs; self.callbackSelectorFailure = fs;
self.contentPath = [[NSBundle mainBundle] pathForResource:filename self.contentURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:filename
ofType:@"html"]; ofType:@"html"]];
self.contentURL = [NSURL fileURLWithPath:self.contentPath];
self.content = [NSString stringWithContentsOfFile:self.contentPath
encoding:NSUTF8StringEncoding
error:NULL];
} }
return self; return self;
} }
@ -54,7 +50,7 @@
- (void)loadView { - (void)loadView {
[super loadView]; [super loadView];
self.webView.delegate = self; self.webView.delegate = self;
[self.webView loadHTMLString:self.content baseURL:self.contentURL]; [self.webView loadRequest:[NSURLRequest requestWithURL:self.contentURL]];
} }
- (void)viewDidLoad { - (void)viewDidLoad {

View file

@ -9,8 +9,15 @@
<body style="background-color: black; color: white; font-family: sans-serif; text-align: center;"> <body style="background-color: black; color: white; font-family: sans-serif; text-align: center;">
<p style="font-weight: bold;"> <p style="font-weight: bold;">
<img style="width: 128px; height: 128px;" alt="ZXing Project Logo" src="../zxing-icon-128.png"></p> <img style="width: 128px; height: 128px;" alt="ZXing Project Logo" src="../zxing-icon-128.png"></p>
<p style="font-weight: bold;">Strichcodes</p> <h2>Strichcodes</h2>
<p>Version 1.0</p>
<p>&copy; 2008 The <a href="http://code.google.com/p/zxing/">ZXing</a> <p>&copy; 2008 The <a href="http://code.google.com/p/zxing/">ZXing</a>
Authors<br> Authors<br>
</p> </p>
<p>
<b>Unterstützte Strichcode-Formate:</b>
</p>
<p>
QR Code<br/>
</p>
</body></html> </body></html>

View file

@ -9,8 +9,15 @@
<body style="background-color: black; color: white; font-family: sans-serif; text-align: center;"> <body style="background-color: black; color: white; font-family: sans-serif; text-align: center;">
<p style="font-weight: bold;"> <p style="font-weight: bold;">
<img style="width: 128px; height: 128px;" alt="ZXing Project Logo" src="../zxing-icon-128.png"></p> <img style="width: 128px; height: 128px;" alt="ZXing Project Logo" src="../zxing-icon-128.png"></p>
<p style="font-weight: bold;">Barcodes</p> <h2>Barcodes</h2>
<p>Version 1.0</p>
<p>&copy; 2008 The <a href="http://code.google.com/p/zxing/">ZXing</a> <p>&copy; 2008 The <a href="http://code.google.com/p/zxing/">ZXing</a>
Authors<br> Authors<br>
</p> </p>
<p>
<b>Supported barcode formats:</b>
</p>
<p>
QR Code<br/>
</p>
</body></html> </body></html>

View file

@ -9,8 +9,15 @@
<body style="background-color: black; color: white; font-family: sans-serif; text-align: center;"> <body style="background-color: black; color: white; font-family: sans-serif; text-align: center;">
<p style="font-weight: bold;"> <p style="font-weight: bold;">
<img style="width: 128px; height: 128px;" alt="ZXing Project Logo" src="../zxing-icon-128.png"></p> <img style="width: 128px; height: 128px;" alt="ZXing Project Logo" src="../zxing-icon-128.png"></p>
<p style="font-weight: bold;">Streckkoder</p> <h2>Streckkoder</h2>
<p>Version 1.0</p>
<p>&copy; 2008 The <a href="http://code.google.com/p/zxing/">ZXing</a> <p>&copy; 2008 The <a href="http://code.google.com/p/zxing/">ZXing</a>
Authors<br> Authors<br>
</p> </p>
<p>
<b>Stödda streckkods-format:</b>
</p>
<p>
QR Code<br/>
</p>
</body></html> </body></html>