linphone-ios/Classes/MoreViewController.m
2012-08-06 16:45:29 +02:00

77 lines
2.9 KiB
Objective-C

/* MoreViewController.m
*
* Copyright (C) 2009 Belledonne Comunications, Grenoble, France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#import "MoreViewController.h"
#include "ConsoleViewController.h"
#import "LinphoneManager.h"
#include "lpconfig.h"
@implementation MoreViewController
@synthesize linkButton;
@synthesize nameLabel;
@synthesize versionLabel;
#pragma mark - Lifecycle Functions
- (void)dealloc {
[linkButton release];
[nameLabel release];
[versionLabel release];
[super dealloc];
}
#pragma mark - ViewController Functions
- (void)viewDidLoad {
[versionLabel setText:[[NSBundle mainBundle] objectForInfoDictionaryKey:(NSString*)kCFBundleVersionKey]];
[nameLabel setText:[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleDisplayName"]];
}
#pragma mark - UICompositeViewDelegate Functions
static UICompositeViewDescription *compositeDescription = nil;
+ (UICompositeViewDescription *)compositeViewDescription {
if(compositeDescription == nil) {
compositeDescription = [[UICompositeViewDescription alloc] init:@"More"
content:@"MoreViewController"
stateBar:nil
stateBarEnabled:false
tabBar: @"UIMainBar"
tabBarEnabled:true
fullscreen:false
landscapeMode:[LinphoneManager runningOnIpad]
portraitMode:true];
}
return compositeDescription;
}
#pragma mark - Action Functions
- (IBAction)onLinkClick:(id) event {
NSURL *url = [NSURL URLWithString:[linkButton titleForState:UIControlStateNormal]];
[[UIApplication sharedApplication] openURL:url];
}
@end