| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- //
- // AboutViewController.m
- // Apex Mobile
- //
- // Created by Ray on 14-2-26.
- // Copyright (c) 2014年 United Software Applications, Inc. All rights reserved.
- //
- #import "AboutViewController.h"
- @interface AboutViewController ()
- @end
- @implementation AboutViewController
- - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
- {
- self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
- if (self) {
- // Custom initialization
- }
- return self;
- }
- - (BOOL)shouldAutorotate
- {
- return YES;
- }
- - (NSUInteger)supportedInterfaceOrientations
- {
- return UIInterfaceOrientationMaskPortrait;
- }
- - (UIInterfaceOrientation)preferredInterfaceOrientationForPresentation
- {
- return UIInterfaceOrientationPortrait;
- }
- - (void)viewDidLoad
- {
- [super viewDidLoad];
- NSDictionary* infoDict =[[NSBundle mainBundle] infoDictionary];
- NSString* versionNum =[infoDict objectForKey:@"CFBundleVersion"];
- versionNum = [NSString stringWithFormat:@"A%@",versionNum];
-
- self.infoText.text = [NSString stringWithFormat:@"Version:%@\nSupport:\nusairedadt@united-us.net",versionNum];
-
- NSString *filePath = [[NSBundle mainBundle]pathForResource:@"about" ofType:@"htm"];
- NSString *htmlString = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:nil];
- [self.webview loadHTMLString:htmlString baseURL:[NSURL URLWithString:filePath]];
-
- // Do any additional setup after loading the view.
- }
- - (void)didReceiveMemoryWarning
- {
- [super didReceiveMemoryWarning];
- // Dispose of any resources that can be recreated.
- }
- - (void)webViewDidFinishLoad:(UIWebView *)webView
- {
- // finished loading, hide the activity indicator in the status bar
- [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
- [self.webview stringByEvaluatingJavaScriptFromString:@"document.getElementsByTagName('body')[0].style.webkitTextSizeAdjust= '350%'"];
- }
- @end
|