//应用程序启动后调用的第一个方法 不懂的程序可以做不同的启动
//launchOption参数的作业:应用在特定条件下的不同启动参数 比如:挑战的支付宝支付
- (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:.
}

回调函数

ios 回调函数作用的更多相关文章

  1. ios回调函数的标准实现:protocol+delegate

    一.项目结构

  2. [PHP]将回调函数作用到给定数组的单元上

    ---------------------------------------------------------------------------------------------------- ...

  3. C++中回调函数(CallBack)的使用

    如果试图直接使用C++的成员函数作为回调函数将发生错误,甚至编译就不能通过. 其错误是普通的C++成员函数都隐含了一个传递函数作为参数,亦即“this”指针,C++通过传递this指针给其成员函数从而 ...

  4. JS 自定义回调函数callback

    1 应用场景:js的异步加载,在get,post,ajax异步加载的时候,可能对应的请求没有完成,这时需要使用请求回来的数据作为参数调用其他函数,这时就需要使用回调函数. 2 回调函数作用:等待函数调 ...

  5. php回调函数的使用

    1.array_map — 将回调函数作用到给定数组的单元上 参数:array array_map ( callable $callback , array $arr1 [, array $... ] ...

  6. iOS面向编码|iOSVideoToolbox:读写解码回调函数CVImageBufferRef的YUV图像

    iOS面向编码|iOSVideoToolbox:读写解码回调函数CVImageBufferRef的YUV图像 本文档基于H.264的解码,介绍读写Video Toolbox解码回调函数参数CVImag ...

  7. JS回调函数的使用和作用

    <html> <head> <title>回调函数(callback)</title> <script language="javasc ...

  8. iOS下ajax回调函数里不能播放audio

    iOS下audio必须监测到事件才可播放, ajax回调函数里不能播放 解决办法 在点击方法里先播放然后立即暂停,在回调函数里重新播放 onclick(function(){ $("#_wx ...

  9. JS判断android/IOS,并执行回调函数

    判断类型: var u = navigator.userAgent; var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') ...

随机推荐

  1. ubuntu物理机上搭建Kubernetes集群 -- 准备

    准备工作 1.kubernetes架构 2.三台ubuntu主机: 操作系统:ubuntu-16.04.1-server-amd64 docker: 1.安装 使用命令 sudo apt-get in ...

  2. 图->连通性->无向图的连通分量和生成树

    文字描述 对无向图进行遍历时,对于连通图,仅需从图中任一顶点出发,进行深度优先搜索或广度优先搜索,便可访问到图中所有顶点.但对非连通图,则需从多个顶点出发搜索,每一次从一个新的起始点出发进行搜索过程得 ...

  3. 查找->静态查找表->次优查找(静态树表)

    文字描算 之前分析顺序查找和折半查找的算法性能都是在“等概率”的前提下进行的,但是如果有序表中各记录的查找概率不等呢?换句话说,概率不等的情况下,描述查找过程的判定树为何类二叉树,其查找性能最佳? 如 ...

  4. BTM学习小记

    BTM的原理跟LDA很像,下面是该模型的概率图: 由该图可以看出来,与LDA的区别在于确定主题分布和词分布后相应地取两个词(而LDA只取一个,即类比常见的骰子说法:先投掷K面的骰子得到主题z,再根据相 ...

  5. Matlab中添加路径与去除路径

    今天在使用Matlab调用内部的PCA函数的时候,报错: 错误使用 pca输入参数太多. 如下图所示: 网上查找原因之后发现是因为我之前下载过开源的工具包toolbox,并且将它的路径add到了Mat ...

  6. 使用poi读写excel文件

    使用poi库测试了一下读取excel文件,效果不错,跟大家分享一下. 第一列是数值型,第二列是字符型,代码如下: package poi; import java.io.FileInputStream ...

  7. oracle如何查看执行计划

    1.在PL/SQL Developer中得到一个SQL的执行计划 输入想要查看执行计划的目标SQL,再按一下快捷键F5就可以了.2.explain plan 命令 explain plan for + ...

  8. CentOS 7.2编译安装nginx1.10.3+MySQL5.5.38+PHP5.5.38

    1.关闭firewallad 关闭防火墙 systemctl stop firewalld.service 禁止firewall开机启动 systemctl disable firewalld.ser ...

  9. PropTypes使用

    PropTypes防止后期代码传参数错误,所以加一个校验, 代码: import React, {Component,PropTypes} from 'react'; import {View, Te ...

  10. SQL Server服务器CPU爆高解决

    昨天下午,测试反映trunk测试环境的数据库CPU一直100%,一开始以为是病毒,内网这段时间老是有个挖矿的病毒,查了一下被隔离了,但是数据库还是慢,停掉SQL server的服务CPU降下来,启动S ...