All pastes #823913 Raw Edit

Someone

public text v1 · immutable
·published 2007-12-19 17:52 UTC
rendered paste body
#import "SampleApp.h"

@implementation SampleApp

- (void)mouseDown:(struct __GSEvent *)xevent
{
    
    if (zoomed)
      [imgView setFrame:CGRectMake(80.0f, 120.0f, 160.0f, 240.0f)];
    else
      [imgView setFrame:CGRectMake(0.0f, 0.0f, 320.0f, 480.0f)];

    zoomed = !zoomed;
}

- (void) applicationDidFinishLaunching: (id) unused
{
    CGRect rect = CGRectMake(0.0f, 0.0f, 320.0f, 480.0f);

    UIWindow *window = [[UIWindow alloc] initWithContentRect: rect];
    UIImage *img = [UIImage applicationImageNamed:@"Default.png"];
    imgView = [[UIImageView alloc] initWithImage:img];

    [window orderFront: self];
    [window makeKey: self];
    [window setContentView: imgView];

    zoomed = NO;
}

@end