VoiceMac/Classes/VoiceMob/Voice/MGMVoiceSMS.m

51 lines
1.0 KiB
Objective-C

//
// MGMVoiceSMS.m
// VoiceMob
//
// Created by Mr. Gecko on 9/30/10.
// Copyright (c) 2010 Mr. Gecko's Media (James Coleman). All rights reserved. http://mrgeckosmedia.com/
//
#import "MGMVoiceSMS.h"
#import "MGMVoiceUser.h"
#import "MGMVMAddons.h"
#import <VoiceBase.h>
@implementation MGMVoiceSMS
+ (id)tabWithVoiceUser:(MGMVoiceUser *)theVoiceUser {
return [[[self alloc] initWithVoiceUser:theVoiceUser] autorelease];
}
- (id)initWithVoiceUser:(MGMVoiceUser *)theVoiceUser {
if (self = [super init]) {
voiceUser = theVoiceUser;
}
return self;
}
- (void)dealloc {
[self releaseView];
[super dealloc];
}
- (MGMVoiceUser *)voiceUser {
return voiceUser;
}
- (UIView *)view {
if (view==nil) {
if (![[NSBundle mainBundle] loadNibNamed:[[UIDevice currentDevice] appendDeviceSuffixToString:@"VoiceSMS"] owner:self options:nil]) {
NSLog(@"Unable to load Voice SMS");
[self release];
self = nil;
} else {
}
}
return view;
}
- (void)releaseView {
if (view!=nil) {
[view release];
view = nil;
}
}
@end