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
51
#import "FlickApplication.h"

@implementation FlickApplication

- (BOOL)respondsToSelector:(SEL)selector {
  NSLog(@"respondsToSelector: %s", selector);
  return [super respondsToSelector:selector];
}

- (void) applicationDidFinishLaunching: (id) unused
{
    
    NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
    
    UIWindow *window;

    window = [[UIWindow alloc] initWithContentRect: [UIHardware fullScreenApplicationContentRect]];
   
    struct CGRect rect = [UIHardware fullScreenApplicationContentRect];
    rect.origin.x = rect.origin.y = 0.0f;

    UIView *mainView = [[UIView alloc] initWithFrame: rect];
    
    UITextView *textView = [[UITextView alloc] initWithFrame: CGRectMake(0.0f, 0.0f, 330.0f, 480.0f)];

    UIFlicker *flick = [[UIFlicker alloc] init];
    [flick setDelegate: self];
    
    CGPoint point;
    point.x = 10;
    point.y = 10;
    [flick setStartLocation: point];
    
    [flick setOffset: point];
    [flick setIterations: 300];
    [flick setDelay: 100.0f];
    [flick run];
    
    [window orderFront: self];
    [window makeKey: self];
    [window _setHidden: NO];

    [mainView addSubview: textView];
    [window setContentView: mainView];
    
    [flick release];
    [mainView release];
    [pool release];
}

@end