几种方法:方法1:在AppDelegate.m里写上- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{ [NSThread s...
分类:
移动开发 时间:
2015-06-25 19:23:56
阅读次数:
604
IOS的AppDelegate方法中的事件触发调用参考:http://blog.sina.com.cn/s/blog_a573f7990101bphp.html//当应用程序将要进入非活动状态执行,在此期间,应用程序不接受消息或事件,比如来电 - (void)applicationWillResi....
分类:
移动开发 时间:
2015-06-24 18:33:05
阅读次数:
146
//当应用程序将要进入非活动状态执行,在此期间,应用程序不接受消息或事件,比如来电 - (void)applicationWillResignActive:(UIApplication *)application { NSLog(@"应用程序将要进入非活动状态,即将进入后台"); }...
分类:
移动开发 时间:
2015-06-24 14:35:38
阅读次数:
142
XMPP实现用户登录与注销登录:步骤:* 在AppDelegate实现登录1. 初始化XMPPStream2. 连接到服务器[传一个JID]3. 连接到服务成功后,再发送密码授权4. 授权成功后,发送"在线" 消息一:导入框架,根据上一篇文章的说明去导入相应的库与文件二:定义一个XMPP的成员变量1...
分类:
移动开发 时间:
2015-06-23 15:14:34
阅读次数:
201
1、删掉工程中main.storyboard 后要删除plist文件中对应的键值,否则会报如下错误:Could not find a storyboard named 'Main' in bundle NSBundle2、删除main.storyboard后,需要在AppDelegate.m中初始化...
分类:
其他好文 时间:
2015-06-23 15:12:52
阅读次数:
96
步骤1:info.plist文件中添加:Required background modes字段,里面的item 值选择:App plays audio or streams audio/video using AirPlay步骤二:在Appdelegate.m中:- (BOOL)applicatio...
分类:
其他好文 时间:
2015-06-22 13:36:30
阅读次数:
152
启发帖 http://blog.k-res.net/archives/1833.html
AppDelegate.cpp 加上一句
engine->executeString("print = release_print");
搞定!
纠结了整整2天!
希望对同样纠结的同学有用!...
分类:
其他好文 时间:
2015-06-21 02:04:15
阅读次数:
308
场景如标题这样不行:[self.navigationController popToRootViewControllerAnimated:YES];MainViewController *mainCtrl = [(AppDelegate *)[UIApplication sharedApplicat...
分类:
其他好文 时间:
2015-06-19 15:10:24
阅读次数:
150
由于app开发的需求,需要从api接口获得json格式数据并保存临时的 app的主题颜色 和 相关url方案有很多种:1, 通过AppDelegate保存为全局变量,再获取2,使用NSUSerDefault第一种 :通过AppDelegate方法:定义全局变量//// AppDelegate.h/....
分类:
移动开发 时间:
2015-06-18 23:49:00
阅读次数:
213
#pragma mark -- 循环引用 //----------------------------------------------------------------------------------------------------
/*
某些block中,使用self会造成循环引用
__weak AppDelegate *weakSel...
分类:
其他好文 时间:
2015-06-18 13:43:04
阅读次数:
164