摘要: 1 #import <UIKit/UIKit.h> 2 3 @interface ViewController : UIViewController <UINavigationControllerDelegate,UIImagePickerControllerDelegate>{ 4 UIImageView *backImageView; 5 } 6 7 @property(retain, nonatomic) IBOutlet UIButton *showImgPickerButton; 8 @property(retain, nonatomic) IBOutlet 阅读全文
posted @ 2012-07-03 11:10 GreyWolf 阅读(320) 评论(0) 推荐(0) 编辑
摘要: 我不知道为什么,不过有人搜索makeKeyAndVisible方法。其实我这种懒人一般不会刨根问底,有些方法照打就好,那些白给的方法有些就别动就好了。我们看看这个每个程序都有的方法吧:[window makeKeyAndVisible];由于iPhone是单窗口程序,所以也就只有这么一个Window对象,而且是UIWindow,不是NSWindow。而根据文档上所说:“这个是便捷方法,去使被使用对象的主窗口显示到屏幕的最前端。你也可以使用hiddenUIView方法隐藏这个窗口”所以基本上来说,对于编程者的区别仅仅在于在其前添加代码,或在其后添加代码 阅读全文
posted @ 2012-06-30 16:02 GreyWolf 阅读(206) 评论(0) 推荐(0) 编辑
摘要: 和SQL Server数据库的查询一样,SQLite数据库也有几个特殊的查询也是比较使用的,比如说:LIKE查询和IN集合查询等,本文介绍了这一部分查询的实例代码,接下来我们就来一一介绍。LIKELIKE 用通配符匹配字符串下划线 _ 匹配一个字符串百分号 % 匹配多个字符串LIKE 匹配字符串时不区分大小写LIKE查询的代码实例如下: 1 sqlite> 2 3 4 5 sqlite> SELECT * FROM Cars WHERE Name Like '____'; 6 7 8 9 Id Name Cost 10 11 12 13 ---- --------- 阅读全文
posted @ 2012-06-30 15:31 GreyWolf 阅读(1478) 评论(0) 推荐(0) 编辑
摘要: ""是从程序头文件开始查找,然后在查找系统库:即引入非标准库<>是只查找系统库:即引入标准库 阅读全文
posted @ 2012-06-30 14:01 GreyWolf 阅读(172) 评论(0) 推荐(0) 编辑
摘要: @synchronized@synchronized(SharedAppDelegate) { [AFHTTPClient setTicket:ticketCookie]; }保证此时没有其他线程对SharedAppDelegate对象进行修改Using the @synchronized DirectiveThe @synchronized directive is a convenient way to create mutex locks on the fly in Objective-C code. The @synchronized directive doe... 阅读全文
posted @ 2012-06-30 10:21 GreyWolf 阅读(386) 评论(0) 推荐(0) 编辑
摘要: GreyWolf的Windows Live Writer客户端测试 阅读全文
posted @ 2012-06-29 15:01 GreyWolf 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 当NSString为纯数字的时候可以用下面的方法://判断是否为整形:- (BOOL)isPureInt:(NSString*)string{ NSScanner* scan = [NSScanner scannerWithString:string]; intval; return[scanscanInt:&val] && [scanisAtEnd];} //判断是否为浮点形:- (BOOL)isPureFloat:(NSString*)string{ NSScanner* scan = [NSScanner scannerWithString:string];... 阅读全文
posted @ 2012-06-28 18:39 GreyWolf 阅读(207) 评论(0) 推荐(0) 编辑
摘要: AnNSScannerobject scans the characters of anNSStringobject, typically interpreting the characters and converting them into number and string values. You assign the scanner’s string on creation, and the scanner progresses through the characters of that string from beginning to end as you request item 阅读全文
posted @ 2012-06-28 18:10 GreyWolf 阅读(270) 评论(0) 推荐(0) 编辑
摘要: UILabel: "TheUILabelclass implements a read-only text view."UITextField: "AUITextFieldobject is a control that displays editable text and sends an action message to a target object when the user presses the return button."UITextView: "TheUITextViewclass implements the behavi 阅读全文
posted @ 2012-06-28 17:23 GreyWolf 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 在运行一个大型的应用程序,在程序能正式工作前需要一段时间来进行初始化.通常我们会显示一个等待画面直到程序初始化完成.在JAVA SE6中提供了一个SplashScreen类让我们能够很方便的实现这个功能. SplashScreen类能够在启动程序时在屏幕中央显示一张预先指定的图片或动画(gif),并且在第一个AWT/SWING窗口显示时自动关闭(当然你也可以在这期间自行关闭).使用SplashScreen的最简单的方法不需要写任何代码,只要在运行程序时在命令行加一个参数-splash:imageFile就可以了,比如 java -splash:splash.gif myApp(如果是jar文件 阅读全文
posted @ 2012-02-11 21:49 GreyWolf 阅读(536) 评论(0) 推荐(0) 编辑