1// 2// iphoneAppDelegate.m 3// iphone 4// 5// Created by Barry Smith on 5/12/10. 6// Copyright __MyCompanyName__ 2010. All rights reserved. 7// 8 9#import "iphoneAppDelegate.h" 10#import "iphoneViewController.h" 11#include "PETSc/petscsys.h" 12 13extern PetscErrorCode PetscVFPrintfiPhone(FILE *,const char *,va_list); 14 15@implementation iphoneAppDelegate 16 17@synthesize window; 18@synthesize viewController; 19 20 21- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 22 // Override point for customization after app launch 23 [window addSubview:viewController.view]; 24 [window makeKeyAndVisible]; 25 MPI_Init(0,0); 26 PetscVFPrintf = PetscVFPrintfiPhone; 27 return YES; 28} 29 30 31- (void)dealloc { 32 MPI_Finalize(); 33 [viewController release]; 34 [window release]; 35 [super dealloc]; 36} 37 38 39@end 40