- 博客(32)
- 资源 (16)
- 收藏
- 关注
转载 使用NSNotificationCenter时要注意的地方
An NSNotificationCenter object (or simply, notification center) provides a mechanism for broadcasting information within a program. AnNSNotificationCenter object is essentially a notification dispatch table.Objects register with a notification center to re
2011-04-30 15:09:00 1451
原创 如何创建模式窗口
常用模式窗口来显示一些临时需要显示的信息,那么它该如何创建呢?- (void)closeLogOnPane{[selfdismissModalViewControllerAnimated:YES]; //关闭已经打开的模式窗口[[NSNotificationCenterdefaultCenter] removeObserver:self name:@"NotificationCloseLogOnPane" object:[selfmodalViewController]];}- (IBAction)Sho
2011-04-30 14:12:00 1748
原创 单实例的类的实现
<br />单实例的类的一个重要作用就是用于维护全局的的信息,它的实现类似乎下面:<br /> <br />//*****************头文件BasicInfoManager.h****************<br /><br />#import <UIKit/UIKit.h><br /> <br />@interface BasicInfoManager : NSObject {<br />NSString *appUserName; //需要管理的全局信息<br />}<br /> <br
2011-04-30 12:33:00 852
原创 ios中常用的线程同步策略-synchronized和NSLock
@synchronized The @synchronized directive is a convenient way to create mutex locks on the fly in Objective-C code. The @synchronized directive does what
2011-04-27 23:50:00 8638
原创 cocoa设计模式经典摘录1
<br /> <br />id<br /> <br /> The id type tells the compiler that a variable points to an object but doesn’t give the compiler any more specific information about the kind of object, hence the object is anonymous.<br /> Use the Anonymous Type pattern
2011-04-27 23:42:00 1385
转载 selector与函数指针
<br /><br /> 源自:《cocoa设计模式》<br /><br /><br /> Selectors identify the messages that are sent to Objective-C objects.They’re used by the receivers of messages to select which methods will be performed. Selectors provide much of the power, flexibility,
2011-04-27 13:05:00 626
原创 iphone开发总结1
<br /> 降低耦合性<br /><br /><br /> - (IBAction)doSomeThing:(id)sender<br /> 将参数的类型设置为id可以降低控制器与其控制的view(控件也属于view)之间的耦合性,因为这样在改变所使用的view时,控制器不需要作任何修改。<br /> <br /> <br /> 使用线程注意事项<br /><br /><br /> 慎用线程,能不开线程的地方尽量不开线程。如确实需要使用线程时,需要主要以下几点:
2011-04-26 23:38:00 1937
转载 MVC中的模型系统的作用
<br />源自《cocoa设计模式》<br /> <br /> The Role of the Model SubsystemConsider the role of the Model subsystem in a ModelView Controller application.The model is composed of the objects that provide the unique capabilities and information storage for an app
2011-04-26 10:12:00 1214
转载 如何在ios中检测网络连接
<br />注:Reachability.h and Reachability.m是apple提供的示例代码,在xcode的developer document中能找到。<br /> <br /> <br /><br />1) Add SystemConfiguration framework to the project but don't worry about including it anywhere<br />2) Add Reachability.h and Reachability.m to
2011-04-23 20:21:00 3072
原创 UIActivityIndicatorView的用法
<br /><br /><br /> <br />- (vooid)someMethod{<br /> UIActivityIndicatorView *activIndicator = [[UIActivityIndicatorViewalloc] <br /> initWithActivityIndicatorStyle:UIActivityIndicatorV
2011-04-22 11:44:00 1222
转载 mysql中insert into select from的使用
本文来源于铁木箱子的博客http://www.mzone.cc 昨天一个朋友问我如何在mysql从多个表中组合字段然后插入到一个新表中,通过一条sql语句实现。具体情形是:有三张表a、b、c,现在需要从表b和表c中分别查几个字段的值插入到表a中对应的字段。对于这种情况
2011-04-21 18:10:00 1771
转载 使用distinct查询不重复的行
<br />SQL SELECT DISTINCT 语句Previous PageNext Page<br />本章讲解 SELECT DISTINCT 语句。SQL SELECT DISTINCT 语句<br />在表中,可能会包含重复值。这并不成问题,不过,有时您也许希望仅仅列出不同(distinct)的值。<br />关键词 DISTINCT 用于返回唯一不同的值。语法:SELECT DISTINCT 列名称 FROM 表名称使用 DISTINCT 关键词<br />如果要从 "Company" 列中
2011-04-21 16:05:00 1044
原创 NSDate和NSString之间的转换
//输入的日期字符串形如:@"1992-05-21 13:08:88"- (NSDate *)dateFromString:(NSString *)dateString{NSDateFormatter *dateFormatter = [[NSDateFormatteralloc] init];[dateFormatter setDateFormat: @"yyyy-MM-dd HH:mm:ss"]; NSDate *destDate= [dateFormatter dateFromString:dateS
2011-04-19 11:26:00 2113 2
转载 SQLite SQL语句结构详解
<br /> 源自:http://tiantian0521.blog.163.com/blog/static/4172088320109272217796/SQLite SQL语句结构详解<br /> SELECTsql-statement ::=SELECT [ALL | DISTINCT] result [FROM table-list]<br />[WHERE expr]<br />[GROUP BY expr-list]<br />[HAVING expr]<br />[compound-op se
2011-04-19 09:28:00 1490
转载 sqlite中如何创建主键,以及如何给主键列赋值
<br />SQLite Autoincrement<br />In SQLite, every row of every table has an 64-bit signed integer ROWID. The ROWID for each row is unique among all rows in the same table.<br />You can access the ROWID of an SQLite table using one the special column names R
2011-04-18 13:14:00 2991
转载 创建主键与外键的命令
-- 创建测试主表. ID 是主键.CREATE TABLE test_main (id INT,value VARCHAR(10),PRIMARY KEY(id) );-- 创建测试子表. CREATE TABLE test_sub (id INT,main_id INT,value VARCHAR(10),PRIMARY KEY(id) );默认外键约束方式ALTER TABLE test_sub A
2011-04-17 20:55:00 1841
转载 NSString和NSDate之间的相互转换
NSString to NSDateNSString*dateString =@"01-02-2010";NSDateFormatter*dateFormatter =[[NSDateFormatter alloc] init];// this is imporant - we set our input date format to match our input string// if format doesn't match you'll get nil from your string, so be
2011-04-17 18:27:00 1005
转载 sql删除表中的记录的方法
<br />sql删除表中的记录的方法<br />源自:http://wxinpeng.iteye.com/blog/540478<br /> 1.删除表中的行:TRUNCATE TABLE2.删除表中的行:DELETE 语句3.删除表:DROP TABLETRUNCATE TABLE 删除表中的所有行,而不记录单个行删除操作。语法 TRUNCATE TABLE table_name 参数 table_name是要截断的表的名称或要删除其全部行的表的名称。注释 TRUNCATE TABLE 在功能上与不带
2011-04-17 17:04:00 827
转载 gcc 链接(-l, -L)和编译(-include, -I)参数
<br /> gcc 链接(-l, -L)和编译(-include, -I)参数<br />l参数和-L参数:<br />-l参数就是用来指定程序要链接的库,-l参数紧接着就是库名,那么库名跟真正的库文件名有什么关系呢?就拿数学库来说,他的库名是m,他的库文件名是libm.so,很容易看出,把库文件名的头lib和尾.so去掉就是库名了。<br />好了现在我们知道怎么得到库名,当我们自已要用到一个第三方提供的库名字libtest.so,那么我们只要把libtest.so拷贝到/usr/lib里,编译时加上-
2011-04-17 14:31:00 977
转载 iPhone: There is no SDK with the name or path 'iphoneos3.0'
<br />iPhone: There is no SDK with the name or path 'iphoneos3.0'<br />解决方法:<br />Tell me about it. Try this in XCode goto 'Project' Menu and select 'Edit Project Settings'. In the General tab, last but one item, select the drop down list 'Base SDK for all
2011-04-17 14:04:00 646
转载 第三方SQLITE封装库pldatabase的介绍
<br />源自:http://aminby.net/2010/08/iphone-sqlite-pldatabase-introduce/引文<br />花了三周时间,把原来使用原生SqliteAPI写的代码都改成了PLSqliteDatabase的操作.<br />下载解压后把framework导入到项目中. 项目中需要sqlite.dylib,不然无法链接成功.<br />pldatabase的网站地址:http://plsqlite.narod.ru/http://code.google.com/p
2011-04-15 19:01:00 1096
转载 SQLite3中TimeStamp的使用问题
<br />SQLite3中TimeStamp的使用问题<br />源自:http://www.cnblogs.com/GDLMO/archive/2010/07/19/1780920.html<br /> <br />在使用SQLite3时使用了TimeStamp,但是遇到一些问题,现总结如下:<br />一、我的SQL语句<br />CREATE TABLE Logs([ID] INTEGER PRIMARY KEY,[IDCardNo] VARCHAR (50),[CreatedTime] TimeS
2011-04-14 16:33:00 1788
转载 腾讯与新浪微博开放平台之比较
<br />编者按:本文由深圳乐荐网络科技有限公司联合创始人@邵宝麟 供稿,哥伦比亚大学计算机在读博士,2007年获得华中科技大学软件工程学士学位。曾在印度Infosys SETLab和美国IBM T.J Watson研究中心进行关于“下一代高性能分布计算”的研究。深圳乐荐网络是一家由美国名校辍学生、美国名校博士、成功创业者组成的创业公司,目前正在研发Web 3.0 时代的高性能推荐互联网产品,目前他们正在寻求人才,感兴趣加入的朋友可以联系@邵宝麟 或者@戴虎宁。时下互联网上最流行的莫过于“社交网络”。
2011-04-14 10:40:00 1136
转载 NSValue和NSNumber的作用和关系
NSValueAn NSValue object is a simple container for a single C or Objective-C data item. It can hold any of the scalar types such as int, float, and char, as well as pointers, structures, and object ids. The purpose of this class is to allow items of such d
2011-04-14 00:09:00 1080
转载 利用NSThread创建新线程
<br /> detachNewThreadSelector:toTarget:withObject:<br />Detaches a new thread and uses the specified selector as the thread entry point.+ (void)detachNewThreadSelector:(SEL)aSelector toTarget:(id)aTarget withObject:(id)anArgumentParametersaSelector<br />T
2011-04-13 23:53:00 830
转载 Objective-C内存管理知识总结
<br />作者 dboylx<br /><br />原帖地址 http://www.cocoachina.com/bbs/read.php?tid-12760.html<br /><br />Objective-C的内存管理机制是比较灵活的,即可以拿来像C/C++一样用,也可以加个AutoreleasePool让它升级为半自动化的内存管理语言。当然,也不能拿JAVA虚拟机中的全自动化GC来比?<br /><br />一,引用计数是实例对象的内存回收唯一参考<br />引用计数(retainCount)
2011-04-13 19:56:00 505
转载 UIViewController内存管理相关的几个方法
<br />dealloc<br />Deallocates the memory occupied by the receiver.- (void)deallocDiscussion<br />Subsequent messages to the receiver may generate an error indicating that a message was sent to a deallocated object (provided the deallocated memory hasn’t b
2011-04-13 16:27:00 849
转载 Program received signal: “0”
<br /><br />Question:<br />Hi all,<br />I'm working on an iPad app that downloads a CSV file from the web and parses the file into a NSMutableArray. (I'm using the code from http://www.macresearch.org/cocoa-scientists-part-xxvi-parsing-csv-data suggested i
2011-04-13 15:55:00 1183
转载 IPhone之UIProgressView
<br /><br />源自:http://hi.baidu.com/aidfan/blog/item/014e5d0ecc6b15de7acbe17e.html<br /> <br />做了一个小Deme,是通过UIActionSheet来显示UIProgressView进度条的。<br /> <br /> <br />代码如下:<br /> <br />@interface View21 : UIViewController <UIActionSheetDelegate><br />{<br />flo
2011-04-12 20:25:00 1039
转载 慎用dictionaryWithObjectsAndKeys方法
<br /><br />源自:http://blog.csdn.net/kmyhy/archive/2010/12/17/6082394.aspx<br /> <br />有这样一段代码:<br />NSDictionary* items2=[NSDictionary dictionaryWithObjectsAndKeys:<br /> [d objectForKey:@"GZDBH"],@"工作单编号",<br /> [d objectForKey:@"LDSJ"],@"来电时间",<br />
2011-04-11 22:42:00 519
转载 结合UIImageView实现图片的移动和缩放
<br /><br />源自:http://blog.csdn.net/kmyhy/archive/2010/12/16/6080191.aspx<br />因为种种原因,需要在iphone应用中实现图片查看功能,由于iphone屏幕支持多点触摸,于是是想到用“手势”来实现图片的实时缩放和移动。借鉴无所不在的internet网络资料之后,终于实现此一功能,过程如下。<br />一、 首先实现原图显示(不缩放)<br />新建MoveScaleImageView类,继承uiview。用于加载一个UIImag
2011-04-11 22:40:00 1117
转载 Some Tips In Object C
<br /> <br /><br />源自:http://blog.csdn.net/kmyhy/archive/2010/07/06/5716755.aspx<br /> <br />1.使用class获得meta class<br />NSLog (@"Class name : %@",[[[arr objectAtIndex:i] class] description]);<br />2.使用NSClassFromString和 NSSelectorFromString<br />id object
2011-04-11 21:48:00 1034
TR069客户端 Android版本 源码 并含开发过程中收集的TR069协议开发资料集合
2021-08-17
2503 2593,MTK META工具最新版本
2018-11-13
OpenGL ES 2.0 Programming Guide[pdf和源代码]
2011-11-19
iPhone OpenGL ES 2D游戏范例-《Sir Lamorak’s Quest》
2011-09-24
learn iphone and ipad cocos2d game development
2011-08-06
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人