iOS
文章平均质量分 63
丑鹰
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
DLog()
#ifdef DEBUG#ifndef DLog# define DLog(fmt, ...) {NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);}#endif#ifndef ELog# define ELog(err) {if(err) DLog(@"%@", err)}#转载 2013-03-05 17:58:14 · 818 阅读 · 0 评论 -
iOS7's subview trimmed if out of parent view bounds
iOS7's subview trimmed if out of parent view boundsbringSubviewToFront problem?1.I've rumbled through new UI info from apple - didn't help.Now let the code and the screensh转载 2013-10-30 09:40:14 · 1526 阅读 · 0 评论 -
iOS中关于json解析的几种方式
http://mobile.51cto.com/iphone-386666.htm作为一种轻量级的数据交换格式,json正在逐步取代xml,成为网络数据的通用格式。有的json代码格式比较混乱,可以使用此“http://www.bejson.com/”网站来进行JSON格式化校验(点击打开链接)。此网站不仅可以检测Json代码中的错误,而且可以以视图形式显示json中的数据内容转载 2013-09-15 11:55:52 · 988 阅读 · 0 评论 -
Objective-C中判断字符串是否包含其他字符串
Objective-C中判断字符串是否包含其他字符串-(BOOL) hasPrefix:(NSString *) astring;检查字符串是否以astring开头; -(BOOL) hasSuffix:(NSString *) astring;检查字符串是否以astring结尾; 使用方式: NSString *filename=@"hello,world"; if([f转载 2013-06-29 10:22:03 · 692 阅读 · 0 评论 -
UIMenuController的UIWindow不是KeyWindow也会让UIMenuController不显示哦~
最近在做私信功能,有山寨微信的味道,需要支持发图片,语音,文字.支持删除复制转发,用UIMenuController实现.功能均完成后,发现UIMenuController有时候不显示.网上此问题统一的解答是:显示弹出菜单,必须实现3个方法,缺一不可: becomFirstResponder方法,使view或者viewController的self成为第一响应者,可以在相应文转载 2013-06-26 10:04:03 · 1239 阅读 · 0 评论 -
MAC地址
http://blog.youkuaiyun.com/doubleuto/article/details/6599516MAC地址(MAC Address) MAC(Medium/Media Access Control)地址,或称为 MAC位址、逻辑地址,用来定义网络设备的位置,由48比特长,12个的16进制数字组成,0到23位是厂商向IETF等机构申请用来标识厂商的代码,也称为“转载 2012-10-31 10:26:05 · 977 阅读 · 0 评论 -
GCD介绍(三): Dispatch Sources
http://www.dreamingwish.com/dream-2012/intro-to-grand-central-dispatch-part-iii-the-dispatch-sources.html 何为Dispatch Sources简单来说,dispatch source是一个监视某些类型事件的对象。当这些事件发生时,它自动将一个block放入一个dispatch qu转载 2012-08-02 11:47:19 · 1056 阅读 · 0 评论 -
Objective-C与JavaScript的交互
http://www.cocoachina.com/iphonedev/sdk/2012/0420/4177.html UIWebView是iOS最常用的SDK之一,它有一个stringByEvaluatingJavaScriptFromString方法可以将javascript嵌入页面中,通过这个方法我们可以在iOS中与UIWebView中的网页元素交互。stringByEval转载 2012-08-06 16:22:36 · 419 阅读 · 0 评论 -
viewWillAppear: not being called inside a UINavigationController
点击打开链接 I just stumbled on a small problem that gave me a great headache. I changed the view hierarchy to implement flipping preferences on the back of my App’s main view. Accordingly, I had to mov转载 2012-07-20 22:29:48 · 566 阅读 · 0 评论 -
GCD介绍(一): 基本概念和Dispatch Queue
http://www.dreamingwish.com/dream-2012/of-of-of-of-gcd-introduced-1-basic-concepts-in-and-the-dispatch-queue.html 什么是GCD?Grand Central Dispatch或者GCD,是一套低层API,提供了一种新的方法来进行并发程序编写。从基本功能上讲,GCD有点像N转载 2012-08-02 11:44:11 · 378 阅读 · 0 评论 -
GCD介绍(四): 完结
http://www.dreamingwish.com/dream-2012/gcd-four-the-the-odds-and-ends.html Dispatch Queue挂起dispatch queue可以被挂起和恢复。使用 dispatch_suspend函数来挂起,使用 dispatch_resume 函数来恢复。这两个函数的行为是如你所愿的。另外,这两个还是也可以用转载 2012-08-02 11:48:11 · 655 阅读 · 0 评论 -
利用 NSXMLParser 类解析 XML 文件时所遇到的问题
为了能演示解析XML文件,并将解析的结果输出到控件台上,在此声明并实现了一个 UIViewController 类的子类 XMLParserViewController, 这个子类将实现 NSXMLParserDelegate 委托中的方法以便解析 XML文件。子类 XMLParserViewController 的代码如下: XMLParserViewController.h 文件:原创 2012-07-09 16:40:39 · 723 阅读 · 0 评论 -
GCD介绍(二): 多核心的性能
http://www.dreamingwish.com/dream-2012/of-of-of-performance-of-of-of-of-of-of-of-gcd-introduced-ba-the-multi-core.html 概念为了在单一进程中充分发挥多核的优势,我们有必要使用多线程技术(我们没必要去提多进程,这玩意儿和GCD没关系)。在低层,GCD全局dispa转载 2012-08-02 11:45:52 · 645 阅读 · 0 评论 -
在 .m 文件中实现了某协议(protocol)中的方法,却不能被执行
在实现文件(.m文件)中,实现了 UITextFieldDelegate 协议中的 - (BOOL)textFieldShouldBeginEditing: 方法,但它却不能被正确执行? @interface AddNewPersonViewController : UIViewController { UITextField *textFieldFirstName;原创 2012-07-05 16:51:34 · 801 阅读 · 0 评论
分享