摘要: Alert views display a concise and informative alert message to the user. Alert views convey important information about an app or the device, interr... 阅读全文
posted @ 2016-01-12 22:53 starainDou 阅读(318) 评论(0) 推荐(0) 编辑
摘要: UIAlertView随着苹果上次iOS 5的发布,对话框视图样式出现在了我们面前,直到现在它都没有发生过很大的变化。下面的代码片段展示了如何初始化和显示一个带有“取消”和“好的”按钮的对话框视图。Objective-C版本:UIAlertView *alertview = [[UIAlertVie... 阅读全文
posted @ 2016-01-12 22:13 starainDou 阅读(211) 评论(0) 推荐(0) 编辑
摘要: One of the things I like most about Apple’s iOS SDK is the consistent and easy-to-use API they provide. Across all their different frameworks there’s ... 阅读全文
posted @ 2016-01-12 17:28 starainDou 阅读(188) 评论(0) 推荐(0) 编辑
摘要: 第一种:UIImage *searchimage=[UIImage imageNamed:@"search.png"]; UIBarButtonItem *barbtn=[[[UIBarButtonItem alloc] initWithImage:nil style:UIBarButtonIte... 阅读全文
posted @ 2016-01-12 17:17 starainDou 阅读(247) 评论(0) 推荐(0) 编辑
摘要: OC是运行时语言,只有在程序运行时,才会去确定对象的类型,并调用类与对象相应的方法。利用runtime机制让我们可以在程序运行时动态修改类、对象中的所有属性、方法,就算是私有方法以及私有属性都是可以动态修改的。本文旨在对runtime的部分特性小试牛刀,更多更全的方法可以参考系统API文件,demo... 阅读全文
posted @ 2016-01-12 17:00 starainDou 阅读(148) 评论(0) 推荐(0) 编辑
摘要: IPhone下每个app可用的内存是被限制的,如果一个app使用的内存超过20M,则系统会向该app发送Memory Warning消息。收到此消息后,app必须正确处理,否则可能出错或者出现内存泄露。app收到Memory Warning后会调用:UIApplication::didReceive... 阅读全文
posted @ 2016-01-12 16:17 starainDou 阅读(1949) 评论(1) 推荐(0) 编辑