Skip to content

Commit b68e3d4

Browse files
committed
Added PrettyFunction
1 parent 5af68ed commit b68e3d4

10 files changed

+1119
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//
2+
// PrettyFunctionAppDelegate.h
3+
// PrettyFunction
4+
//
5+
// Created by Hiroshi Hashiguchi on 10/10/22.
6+
// Copyright 2010 . All rights reserved.
7+
//
8+
9+
#import <UIKit/UIKit.h>
10+
11+
@class ViewController;
12+
13+
@interface PrettyFunctionAppDelegate : NSObject <UIApplicationDelegate> {
14+
UIWindow *window;
15+
ViewController *viewController;
16+
}
17+
18+
@property (nonatomic, retain) IBOutlet UIWindow *window;
19+
@property (nonatomic, retain) IBOutlet ViewController *viewController;
20+
21+
@end
22+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
//
2+
// PrettyFunctionAppDelegate.m
3+
// PrettyFunction
4+
//
5+
// Created by Hiroshi Hashiguchi on 10/10/22.
6+
// Copyright 2010 . All rights reserved.
7+
//
8+
9+
#import "PrettyFunctionAppDelegate.h"
10+
#import "ViewController.h"
11+
12+
@implementation PrettyFunctionAppDelegate
13+
14+
@synthesize window;
15+
@synthesize viewController;
16+
17+
18+
#pragma mark -
19+
#pragma mark Application lifecycle
20+
21+
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
22+
23+
// Add the view controller's view to the window and display.
24+
[window addSubview:viewController.view];
25+
[window makeKeyAndVisible];
26+
27+
return YES;
28+
}
29+
30+
31+
- (void)applicationWillResignActive:(UIApplication *)application {
32+
/*
33+
Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
34+
Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
35+
*/
36+
}
37+
38+
39+
- (void)applicationDidEnterBackground:(UIApplication *)application {
40+
/*
41+
Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
42+
If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
43+
*/
44+
}
45+
46+
47+
- (void)applicationWillEnterForeground:(UIApplication *)application {
48+
/*
49+
Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background.
50+
*/
51+
}
52+
53+
54+
- (void)applicationDidBecomeActive:(UIApplication *)application {
55+
/*
56+
Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
57+
*/
58+
}
59+
60+
61+
- (void)applicationWillTerminate:(UIApplication *)application {
62+
/*
63+
Called when the application is about to terminate.
64+
See also applicationDidEnterBackground:.
65+
*/
66+
}
67+
68+
69+
#pragma mark -
70+
#pragma mark Memory management
71+
72+
- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
73+
/*
74+
Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later.
75+
*/
76+
}
77+
78+
79+
- (void)dealloc {
80+
[viewController release];
81+
[window release];
82+
[super dealloc];
83+
}
84+
85+
86+
@end
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//
2+
// PrettyFunctionViewController.h
3+
// PrettyFunction
4+
//
5+
// Created by Hiroshi Hashiguchi on 10/10/22.
6+
// Copyright 2010 . All rights reserved.
7+
//
8+
9+
#import <UIKit/UIKit.h>
10+
11+
@interface ViewController : UIViewController {
12+
13+
}
14+
15+
@end
16+
+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
//
2+
// PrettyFunctionViewController.m
3+
// PrettyFunction
4+
//
5+
// Created by Hiroshi Hashiguchi on 10/10/22.
6+
// Copyright 2010 . All rights reserved.
7+
//
8+
9+
#import "ViewController.h"
10+
11+
@implementation ViewController
12+
13+
14+
15+
/*
16+
// The designated initializer. Override to perform setup that is required before the view is loaded.
17+
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
18+
if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
19+
// Custom initialization
20+
}
21+
return self;
22+
}
23+
*/
24+
25+
/*
26+
// Implement loadView to create a view hierarchy programmatically, without using a nib.
27+
- (void)loadView {
28+
}
29+
*/
30+
31+
32+
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
33+
34+
- (void)viewDidLoad {
35+
[super viewDidLoad];
36+
// Override point for customization after application launch.
37+
38+
NSLog(@"1: %s", __PRETTY_FUNCTION__);
39+
40+
[UIView animateWithDuration:1.0
41+
animations:^{
42+
NSLog(@"2: %s", __PRETTY_FUNCTION__);
43+
}];
44+
45+
[UIView animateWithDuration:1.0
46+
animations:^{
47+
NSLog(@"3: %s", __PRETTY_FUNCTION__);
48+
}];
49+
50+
51+
[UIView animateWithDuration:1.0
52+
animations:^{
53+
[UIView animateWithDuration:1.0
54+
animations:^{
55+
NSLog(@"4: %s", __PRETTY_FUNCTION__);
56+
}];
57+
}];
58+
}
59+
/*
60+
// Override to allow orientations other than the default portrait orientation.
61+
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
62+
// Return YES for supported orientations
63+
return (interfaceOrientation == UIInterfaceOrientationPortrait);
64+
}
65+
*/
66+
67+
- (void)didReceiveMemoryWarning {
68+
// Releases the view if it doesn't have a superview.
69+
[super didReceiveMemoryWarning];
70+
71+
// Release any cached data, images, etc that aren't in use.
72+
}
73+
74+
- (void)viewDidUnload {
75+
// Release any retained subviews of the main view.
76+
// e.g. self.myOutlet = nil;
77+
}
78+
79+
80+
- (void)dealloc {
81+
[super dealloc];
82+
}
83+
84+
@end

0 commit comments

Comments
 (0)