iOS APP开发如何用具体的代码实现

      绝大部分软件都是由多人合作完成的,团队成员之间相互有依赖关系。软件工程包括了开发、运营、维护软件的过程中很多技术、做法、习惯额思想。软件工程把这些相关的技术和过程统一到一个体系中,叫“软件开发流程”,软件开发流程的目的是为了提高软件开发、运营、维护的效率,以及提升用户满意度、软件的可靠性和可维护性。软件开发流程不光指团队的流程,还包括个人开发流程,因为软件团队是由个人组成的。在团队的大流程中,是每一个具体的个人在做开发、测试、用户界面设计、管理、交流等工作。因此,个人在团队中也有独立的流程。

首先下载了Xcode7.3,新建一个Xcode项目,新建一个单窗体程序。

左侧是Xcode自动生成了目录结构和简单的配置文件,右侧是工具栏。

源代码:

//
// AppDelegate.h
// test1451305
//
// Created by songxinghua on 16/4/22.
// Copyright © 2016年 songxinghua. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;


@end

 

//

//  AppDelegate.m

//  test1451305

//

//  Created by songxinghua on 16/4/22.

//  Copyright © 2016年 songxinghua. All rights reserved.

//

 

#import "AppDelegate.h"

 

@interface AppDelegate ()

 

@end

 

@implementation AppDelegate

 

 

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

    // Override point for customization after application launch.

    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, this method is called instead of applicationWillTerminate: when the user quits.

}

 

- (void)applicationWillEnterForeground:(UIApplication *)application {

    // Called as part of the 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. Save data if appropriate. See also applicationDidEnterBackground:.

}

 

@end

 

//
// main.m
// test1451305
//
// Created by songxinghua on 16/4/22.
// Copyright © 2016年 songxinghua. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "AppDelegate.h"

int main(int argc, char * argv[]) {
@autoreleasepool {
return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
}
}

//
// ViewController.h
// test1451305
//
// Created by songxinghua on 16/4/22.
// Copyright © 2016年 songxinghua. All rights reserved.
//

#import <UIKit/UIKit.h>

@interface ViewController : UIViewController


@end

 

//
// ViewController.m
// test1451305
//
// Created by songxinghua on 16/4/22.
// Copyright © 2016年 songxinghua. All rights reserved.
//

#import "ViewController.h"

@interface ViewController ()

@end

@implementation ViewController

- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}

@end

在项目目录下面的Main.stroyboard界面中拖进一个label标签,叫做Hello World!拖进一个输入框和按钮,修改位置和名字,添加一张照片,修改特效

完成之后:(模拟器使用iPhone6s Plus视图)

效果:在对话框中输入May the force be with you!之后点击DONE按钮出现下面的照片。

                                                                                                                    2016-04-22

                                                                                                                    16:27:06

posted on 2016-04-22 16:27  宋星桦  阅读(239)  评论(0编辑  收藏  举报