zoukankan      html  css  js  c++  java
  • UIViewController

    AppDelegate.m
     
    //程序开启后执行
    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
        return YES;
    }
    - (void)applicationWillResignActive:(UIApplication *)application {
        // 当前应用程序进入非活动状态,挂到后台,不再接收事件(按钮不能再交互,但是推送和下载还在)
    }
    - (void)applicationDidEnterBackground:(UIApplication *)application {
        //应用程序被推入后台(远程推送、线程下载等后台活动仍然运行)
    }
    - (void)applicationWillEnterForeground:(UIApplication *)application {
        //当应用程序将要从后台挂起的状态重新回到前台的时候调用
    }
    - (void)applicationDidBecomeActive:(UIApplication *)application {
        //应用程序进入活动状态
    }
    - (void)applicationWillTerminate:(UIApplication *)application {
        //应用程序将要被推退出时调用,通常用来保存数据和推出前的清理工作
    }
    @end
     
    /*************************************************************/
     
    ViewController.m
     
    - (void)viewDidLoad {//视图加载入口<1>
        [super viewDidLoad];
    }
    -(void)viewWillAppear:(BOOL)animated{}//视图将要出现<2>
    -(void)viewDidAppear:(BOOL)animated{}//视图已经出现<3>
    -(void)viewWillDisappear:(BOOL)animated{}//视图将要消失<4>
    -(void)viewDidDisappear:(BOOL)animated{}//视图已经消失<5>
    - (void)didReceiveMemoryWarning {//内存警告
        [super didReceiveMemoryWarning];
    }
    -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{}//开始触摸
    -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{}//正在触摸
    -(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{}//结束触摸
    -(void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event{}//滑动取消
    @end
  • 相关阅读:
    动态图片 Movie android-gif-drawable GifView
    X5SDK 腾讯浏览器内核
    AS 自动生成选择器 SelectorChapek
    Genymotion 模拟器 VirtualBox
    360加固保 安全防护 多渠道打包
    Thread 如何安全结束一个线程 MD
    面试题 HashMap 数据结构 实现原理
    nGrinder3.4 性能测试框架安装
    java内存泄漏的定位与分析
    JVM总结-内存监视手段及各区域内存溢出解决
  • 原文地址:https://www.cnblogs.com/liuyingjie/p/4989775.html
Copyright © 2011-2022 走看看