2012年9月18日

Qt Creator快捷键

摘要: 激活欢迎模式Ctrl + 1激活编辑模式Ctrl + 2激活调试模式Ctrl + 3激活项目模式Ctrl + 4激活帮助模式Ctrl + 5激活输出模式Ctrl + 6查找当前文档Ctrl + F查找下一个F3查找上一个Shift + F3弹出查找对话框Ctrl + Shift + F返回到代码编辑状态Esc页面之间切换Alt +左,按Alt +右自动完成Ctrl + Space声明和定义之间切换F2头文件和源文件之间切换F4隐藏或显示边栏Alt + 0切换至生成窗口Alt + 1切换至搜索结果窗口Alt + 2切换至应用输出窗口Alt + 3切换至编译输出窗口Alt + 4下一个书签Ctrl 阅读全文

posted @ 2012-09-18 00:13 kiao295338444 阅读(126) 评论(0) 推荐(0) 编辑

2012年9月17日

ios把block添加到字典中

摘要: -(void)uploadAlbum:(NSArray *)imageArray describe:(NSString *)describe{ __blockNSMutableArray *resultArray = [NSMutableArrayarray]; ImageToDataStrComplete handleBlock = Block_copy(^{ DataPacket *dataPacket = [[DataPacket alloc] init] NSMutableDictionary *dic = [NSMutableDictionarydiction... 阅读全文

posted @ 2012-09-17 16:17 kiao295338444 阅读(1504) 评论(0) 推荐(0) 编辑

2012年9月13日

ios开发之生成,合成通用静态库

摘要: ios开发之生成,合成通用静态库1 最初在做基于ios系统开发时使用静态库必须单独使用适合于模拟器的静态库 适合于真机的静态库,两个静态库要频繁切换,现在,可以使用命令行工具lipo将适用于真机与模拟器的静态库合二为一,操作如下user#lipo -create /ospath/libname.a /simulatorpath/libname.a -output /allInOnelibName.a 即可用如下命令可以看到合并后静态库支持的cpu架构信息user#lipo -info /allInOnelibName.aArchitectures in the fat file: /Users 阅读全文

posted @ 2012-09-13 23:45 kiao295338444 阅读(209) 评论(0) 推荐(0) 编辑

ios 计算方法执行的时间

摘要: 转自:http://jordy.easymorse.com/?p=849#more-849在ios开发中,有时我们需要考虑方法执行的时间来做优化,比方查找数据库的方法(需要知道查找数据的时间),具体的计算方法如下:1、新建一个文件:CalculateRunTime.h 代码:@interface CalculateRunTime : NSObjectCGFloat BUNRTimeBlock (void (^block)(void));@endCalculateRunTime.m 代码#import <mach/mach_time.h>@implementation Calcula 阅读全文

posted @ 2012-09-13 23:42 kiao295338444 阅读(422) 评论(0) 推荐(0) 编辑

iOS从info.plist 获取项目的名称及版本号(转)

摘要: NSString *executableFile = [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString *)kCFBundleExecutableKey];NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString *)kCFBundleVersionKey];还有其它很多信息可由infoDictionary获得,以下是官方文档里的说明:information Property List KeysStandard 阅读全文

posted @ 2012-09-13 15:30 kiao295338444 阅读(603) 评论(0) 推荐(0) 编辑

2012年8月22日

objective-c 获取seletor方法的返回类型

摘要: If this is runtime discovery of the return type, you can use the ObjC runtime API to lookup the method definition, then return type, of a given object method. Specifically the methods:Method class_getInstanceMethod(Class aClass, SEL aSelector)orMethod class_getClassMethod(Class aClass, SEL aSelector 阅读全文

posted @ 2012-08-22 00:00 kiao295338444 阅读(346) 评论(0) 推荐(0) 编辑

2012年8月16日

在SQL中判断一个表是否存在

摘要: 转自:http://blog.csdn.net/strugglesword/article/details/3372422 在SQL中判断一个表是否存在create table if not exists a(id varchar(10)); <%sql="if exists (select * from sysobjects where id = object_id(N'[dbo].[phone]') and OBJECTPROPERTY(id, N'IsUserTable') = 1) drop table [dbo].[phone]&quo 阅读全文

posted @ 2012-08-16 15:40 kiao295338444 阅读(1886) 评论(0) 推荐(0) 编辑

2012年7月25日

各种路径的获取方法

摘要: 转http://blog.csdn.net/banyingli/article/details/6124995根据文件名来获取文件路径(Document目录下)//根据文件名来获取文件路径-(NSString*)dataFilePath:(NSString*)sender{NSArray*path=NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES);NSString*documentDirectory=[pathobjectAtIndex:0];return[documentDirector 阅读全文

posted @ 2012-07-25 22:33 kiao295338444 阅读(154) 评论(0) 推荐(0) 编辑

2012年7月24日

CoreAnimation编程指南(十)KVC 转:http://www.dreamingwish.com/

摘要: CAAnimation和CALayer类扩展了NSKeyValueCoding协议,给键添加默认值,扩展了封装协议,支持CGPoint、CGRect、CGSize和CATransform3D关键路径。1.1 键-值编码兼容的容器类CALayer和CAAnimation都是键-值编码兼容的容器类,允许你修改属性键对应的值。即使键为“someKey”对应的属性没有被定义,你也可以给“someKey”的键设置一个值,如下: [theLayer setValue:[NSNumber numberWithInteger:50] forKey:@"someKey"];你可以通过下面的代 阅读全文

posted @ 2012-07-24 22:35 kiao295338444 阅读(166) 评论(0) 推荐(0) 编辑

CoreAnimation编程指南(九)图层布局 转自:http://www.dreamingwish.com/

摘要: NSView提供了经典的“stuts and springs”模式,用于视图调整大小的时候把关联到它父图层的视图重新调整位置。图层支持该模式,而且Mac OS X上面的核心动画提供了一个更通用的布局管理器机制,允许开发者自己写他们自己的布局管理器。可以为图层定制一个布局管理器(它通常实现CALayoutManager协议),负责给图层的子图层提供布局功能。本章介绍了约束布局管理器和如何配置一系列约束条件。iOS注意:iOS的CALayer类仅提供“stuts and springs”模式,不提供定制的布局管理器。然而如果你想人工修改关联到特别视图的图层的位置的话,你可以重载相应视图的layou 阅读全文

posted @ 2012-07-24 22:34 kiao295338444 阅读(192) 评论(0) 推荐(0) 编辑

导航