Skip to content

Commit 14b7fd4

Browse files
committed
first commit
0 parents  commit 14b7fd4

16 files changed

+1265
-0
lines changed

Classes/AppDelegate.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//
2+
// AppDelegate.h
3+
// Created by http://github.com/iosdeveloper
4+
//
5+
6+
#import <UIKit/UIKit.h>
7+
8+
@class ViewController;
9+
10+
@interface AppDelegate : NSObject <UIApplicationDelegate> {
11+
UIWindow *window;
12+
ViewController *viewController;
13+
}
14+
15+
@property (nonatomic, retain) IBOutlet UIWindow *window;
16+
@property (nonatomic, retain) IBOutlet ViewController *viewController;
17+
18+
@end

Classes/AppDelegate.m

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
//
2+
// AppDelegate.m
3+
// Created by http://github.com/iosdeveloper
4+
//
5+
6+
#import "AppDelegate.h"
7+
#import "ViewController.h"
8+
#import "LaunchImageTransition.h"
9+
10+
@implementation AppDelegate
11+
12+
@synthesize window;
13+
@synthesize viewController;
14+
15+
#pragma mark -
16+
#pragma mark Application lifecycle
17+
18+
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
19+
//self.window.rootViewController = [[[LaunchImageTransition alloc] initWithViewController:self.viewController animation:UIModalTransitionStyleFlipHorizontal] autorelease];
20+
self.window.rootViewController = [[[LaunchImageTransition alloc] initWithViewController:self.viewController animation:UIModalTransitionStyleCrossDissolve] autorelease];
21+
//self.window.rootViewController = [[[LaunchImageTransition alloc] initWithViewController:self.viewController animation:UIModalTransitionStyleFlipHorizontal delay:1.0] autorelease];
22+
//self.window.rootViewController = [[[LaunchImageTransition alloc] initWithViewController:self.viewController animation:UIModalTransitionStyleCrossDissolve delay:1.0] autorelease];
23+
[self.window makeKeyAndVisible];
24+
25+
return YES;
26+
}
27+
28+
#pragma mark -
29+
#pragma mark Memory management
30+
31+
- (void)dealloc {
32+
[viewController release];
33+
[window release];
34+
35+
[super dealloc];
36+
}
37+
38+
@end

Classes/ViewController.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//
2+
// ViewController.h
3+
// Created by http://github.com/iosdeveloper
4+
//
5+
6+
#import <UIKit/UIKit.h>
7+
8+
@interface ViewController : UIViewController {
9+
10+
}
11+
12+
@end

Classes/ViewController.m

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//
2+
// ViewController.m
3+
// Created by http://github.com/iosdeveloper
4+
//
5+
6+
#import "ViewController.h"
7+
8+
@implementation ViewController
9+
10+
@end

LICENSE.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
As always, all my source code can be used royalty-free into your app. Just make sure that you don’t remove the copyright notice from the source code if you make your app open source. You don’t have to attribute me in your app, although I would be glad if you do so.

LaunchImageTransition-Info.plist

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>English</string>
7+
<key>CFBundleDisplayName</key>
8+
<string>${PRODUCT_NAME}</string>
9+
<key>CFBundleExecutable</key>
10+
<string>${EXECUTABLE_NAME}</string>
11+
<key>CFBundleIconFile</key>
12+
<string></string>
13+
<key>CFBundleIdentifier</key>
14+
<string>de.max-baeumle.launchimagetransition</string>
15+
<key>CFBundleInfoDictionaryVersion</key>
16+
<string>6.0</string>
17+
<key>CFBundleName</key>
18+
<string>${PRODUCT_NAME}</string>
19+
<key>CFBundlePackageType</key>
20+
<string>APPL</string>
21+
<key>CFBundleSignature</key>
22+
<string>????</string>
23+
<key>CFBundleVersion</key>
24+
<string>1.0</string>
25+
<key>LSRequiresIPhoneOS</key>
26+
<true/>
27+
<key>NSMainNibFile</key>
28+
<string>MainWindow</string>
29+
</dict>
30+
</plist>

LaunchImageTransition.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//
2+
// LaunchImageTransition.h
3+
// Created by http://github.com/iosdeveloper
4+
//
5+
6+
#import <UIKit/UIKit.h>
7+
8+
@interface LaunchImageTransition : UIViewController {
9+
10+
}
11+
12+
- (id)initWithViewController:(UIViewController *)controller animation:(UIModalTransitionStyle)transition;
13+
- (id)initWithViewController:(UIViewController *)controller animation:(UIModalTransitionStyle)transition delay:(NSTimeInterval)seconds;
14+
15+
@end

LaunchImageTransition.m

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
//
2+
// LaunchImageTransition.m
3+
// Created by http://github.com/iosdeveloper
4+
//
5+
6+
#import "LaunchImageTransition.h"
7+
8+
@implementation LaunchImageTransition
9+
10+
- (id)initWithViewController:(UIViewController *)controller animation:(UIModalTransitionStyle)transition {
11+
return [self initWithViewController:controller animation:transition delay:0.0];
12+
}
13+
14+
- (id)initWithViewController:(UIViewController *)controller animation:(UIModalTransitionStyle)transition delay:(NSTimeInterval)seconds {
15+
self = [super init];
16+
17+
if (self) {
18+
NSDictionary *infoDictionary = [[NSBundle mainBundle] infoDictionary];
19+
20+
NSString *launchImageFile = [infoDictionary objectForKey:@"UILaunchImageFile"];
21+
22+
NSString *launchImageFileiPhone = [infoDictionary objectForKey:@"UILaunchImageFile~iphone"];
23+
24+
if (launchImageFile != nil) {
25+
[self.view addSubview:[[[UIImageView alloc] initWithImage:[UIImage imageNamed:launchImageFile]] autorelease]];
26+
} else if (launchImageFileiPhone != nil) {
27+
[self.view addSubview:[[[UIImageView alloc] initWithImage:[UIImage imageNamed:launchImageFileiPhone]] autorelease]];
28+
} else {
29+
[self.view addSubview:[[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"Default.png"]] autorelease]];
30+
}
31+
32+
[controller setModalTransitionStyle:transition];
33+
34+
[NSTimer scheduledTimerWithTimeInterval:seconds target:self selector:@selector(timerFireMethod:) userInfo:controller repeats:NO];
35+
}
36+
37+
return self;
38+
}
39+
40+
- (void)timerFireMethod:(NSTimer *)theTimer {
41+
[self presentModalViewController:[theTimer userInfo] animated:YES];
42+
}
43+
44+
@end

0 commit comments

Comments
 (0)