/
AppDelegate.m
50 lines (37 loc) · 1.38 KB
/
AppDelegate.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//
// AppDelegate.m
//
// Created by Keith Lazuka on 5/23/09.
//
#import "AppDelegate.h"
#import "SearchTableViewController.h"
#import "SearchPhotosViewController.h"
#import "Three20/Three20.h"
@implementation AppDelegate
@synthesize window;
- (void)applicationDidFinishLaunching:(UIApplication *)application
{
// Allow HTTP response size to be unlimited.
[[TTURLRequestQueue mainQueue] setMaxContentLength:0];
// Configure the in-memory image cache to keep approximately
// 10 images in memory, assuming that each picture's dimensions
// are 320x480. Note that your images can have whatever dimensions
// you want, I am just setting this to a reasonable value
// since the default is unlimited.
[[TTURLCache sharedCache] setMaxPixelCount:10*320*480];
tabController = [[UITabBarController alloc] init];
[tabController setViewControllers:
[NSArray arrayWithObjects:
[[[UINavigationController alloc] initWithRootViewController:[[[SearchTableViewController alloc] init] autorelease]] autorelease],
[[[UINavigationController alloc] initWithRootViewController:[[[SearchPhotosViewController alloc] init] autorelease]] autorelease],
nil]];
[window addSubview:[tabController view]];
[window makeKeyAndVisible];
}
- (void)dealloc
{
[tabController release];
[window release];
[super dealloc];
}
@end