.m文件
//
// Test1AppDelegate.m
// Test1
//
// Created by stu42 on 11-9-23.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#import "Test1AppDelegate.h"
@implementation Test1AppDelegate
@synthesize window;
@synthesize slider;
@synthesize field;
-(IBAction) sliderChanged{
NSString *text =[NSString stringWithFormat:@"%3.2F", slider.value];
field.text = text;
}
#pragma mark -
#pragma mark Application lifecycle
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
[self.window makeKeyAndVisible];
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application {
/*
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.
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.
*/
}
- (void)applicationDidEnterBackground:(UIApplication *)application {
/*
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.
If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
*/
}
- (void)applicationWillEnterForeground:(UIApplication *)application {
/*
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.
*/
}
- (void)applicationDidBecomeActive:(UIApplication *)application {
/*
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.
*/
}
- (void)applicationWillTerminate:(UIApplication *)application {
/*
Called when the application is about to terminate.
See also applicationDidEnterBackground:.
*/
}
#pragma mark -
#pragma mark Memory management
- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application {
/*
Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later.
*/
}
- (void)dealloc {
[window release];
[super dealloc];
}
@end
.h文件
//
// Test1AppDelegate.h
// Test1
//
// Created by stu42 on 11-9-23.
// Copyright 2011 __MyCompanyName__. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface Test1AppDelegate : NSObject <UIApplicationDelegate> {
UIWindow *window;
UISlider *slider;
UITextField *field;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UISlider *slider;
@property (nonatomic, retain) IBOutlet UITextField *field;
-(IBAction) sliderChanged;
@end
分享到:
相关推荐
Iphone开发系列源码——iPhone版Wordpress源代码Iphone开发系列源码——iPhone版Wordpress源代码Iphone开发系列源码——iPhone版Wordpress源代码Iphone开发系列源码——iPhone版Wordpress源代码Iphone开发系列源码...
iphone_UI源代码 iphone_UI源代码 iphone_UI源代码 iphone_UI源代码
iPhone开发入门经典,源代码 iPhone开发入门到精通源代码
iOS编程揭秘iPhone与iPad应用开发入门教材源代码
iphone开发 入门经典 源代码 1 还有2请大家下载
iPhone开发Objective-C语法入门 iphone 入门 iphone 开发入门 iPhone开发Objective-C语法入门 iphone 入门 iphone 开发入门
iPhone+SDK编程入门经典:使用Objective-C
iPhone弹球游戏源代码
人民邮电出版社《Objective-C基础教程》(含源代码) 影印版的PDF文件+原书附带的代码,特别适合学习iPhone,iPad入门开发学习~
iphone NanoLife粒子 源代码 iphone NanoLife粒子 源代码 iphone NanoLife粒子 源代码
iPhone 创建地图 源代码 如何创建地图例子源代码
电脑需预先安装JDK 空间说说由iPhone发表,Java源代码
iphone 基础开发源代码Beginning iPhone Dev Aug 2 2009 iphone 基础开发源代码Beginning iPhone Dev Aug 2 2009 iphone 基础开发源代码Beginning iPhone Dev Aug 2 2009
iphone开发基础教程的源代码,代码已经编译通过。
iPhone 游戏 源代码 四 分享一下 希望对大家开发有帮助
iPhone 游戏 源代码 分享一下 希望对大家开发有帮助
一个iPhone项目的源代码,项目包括Iphone epub pdf microbar video music,下载,webview等
知易Cocos2D-iPhone开发教程源代码。 移动开发新手入门必备。
iPhone 游戏 源代码 分享一下iphone游戏的源代码 为大家学习提供帮助