Expanded open file functionality to use available apps.
[pithos-ios] / Classes / AboutViewController.m
1 //
2 //  AboutViewController.m
3 //  OpenStack
4 //
5 //  Created by Mike Mayo on 1/8/11.
6 //  Copyright 2011 __MyCompanyName__. All rights reserved.
7 //
8
9 #import "AboutViewController.h"
10 #import "UIViewController+Conveniences.h"
11
12 @implementation AboutViewController
13
14 - (void)viewDidLoad {
15     [super viewDidLoad];
16     self.navigationItem.title = @"About";
17
18     // show the actual version of the app in the about screen
19     NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleVersion"];
20     NSRegularExpression *regex = [NSRegularExpression regularExpressionWithPattern:@"<version>" options:NSRegularExpressionCaseInsensitive error:nil];            
21     NSRange range = [regex rangeOfFirstMatchInString:textView.text options:0 range:NSMakeRange(0, 100)];
22     if (!NSEqualRanges(range, NSMakeRange(NSNotFound, 0))) {
23         textView.text = [textView.text stringByReplacingCharactersInRange:range withString:version];
24     }
25 }
26
27 - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
28     return (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) || (toInterfaceOrientation == UIInterfaceOrientationPortrait);
29 }
30
31 - (void)dealloc {
32     [super dealloc];
33 }
34
35
36 @end