随笔分类 -  iOS

iOS开发
【深入学习iOS开发(四)】Regular Expression(正则表达式)
摘要:Regular Expression(正则表达式)维基百科:http://en.wikipedia.org/wiki/Regular_expression正则表达式在线测试:http://tool.chinaz.com/regex/正则表达式,常用于文件搜索和数据校验等iOS 提供了对正则表达式的支持:NSRegularExpression代码示例:- (BOOL)isValidWithRegex:(NSString *) regex { BOOL result = NO; if (regex != nil) { NSError *error = nil; ... 阅读全文
posted @ 2013-05-17 17:04 Anthony Li 阅读(1834) 评论(0) 推荐(0) 编辑
Android与iOS支持的音频格式
摘要:AndroidAndroid Supported Media Formats :http://developer.android.com/guide/appendix/media-formats.htmliOSThe Basics: Audio Codecs, Supported Audio Formats, and Audio Sessions:http://developer.apple.com/library/ios/#documentation/AudioVideo/Conceptual/MultimediaPG/UsingAudio/UsingAudio.html总结对比 Andro 阅读全文
posted @ 2013-05-17 14:55 Anthony Li 阅读(10740) 评论(0) 推荐(1) 编辑
【iOS XMPP】使用XMPPFramewok(五):好友列表
摘要:好友列表好友列表,在 XMPP 中被称为 roster,花名册?获取 roster 需要客户端发送 <iq /> 标签向 XMPP 服务器端查询一个 IQ 请求:<iq type="get" from="xiaoming@example.com" to="example.com" id="1234567"> <query xmlns="jabber:iq:roster"/><iq />type 属性,说明了该 iq 的类型为 get,与 HTTP 阅读全文
posted @ 2013-05-17 14:10 Anthony Li 阅读(17306) 评论(2) 推荐(0) 编辑
【iOS XMPP】使用XMPPFramewok(四):收发消息
摘要:收发消息接收消息通过实现- (void)xmppStream:(XMPPStream *)sender didReceiveMessage:(XMPPMessage *)message;方法当接收到 <message /> 标签的内容时,XMPPFramework 框架回调该方法根据 XMPP 协议,消息体的内容存储在标签 <body /> 内- (void)xmppStream:(XMPPStream *)sender didReceiveMessage:(XMPPMessage *)message { NSString *messageBody = [[messag 阅读全文
posted @ 2013-05-16 17:06 Anthony Li 阅读(13744) 评论(1) 推荐(0) 编辑
【iOS XMPP】使用XMPPFramewok(三):好友状态
摘要:好友状态获取好友状态,通过实现- (void)xmppStream:(XMPPStream *)sender didReceivePresence:(XMPPPresence *)presence方法当接收到 <presence /> 标签的内容时,XMPPFramework 框架回调该方法一个 <presence /> 标签的格式一般如下:<presence from=""> <show>这里是显示的内容<show /> <status>这里是显示的状态<status /><pres 阅读全文
posted @ 2013-05-13 09:38 Anthony Li 阅读(8585) 评论(0) 推荐(0) 编辑
【iOS XMPP】使用XMPPFramewok(二):用户登录
摘要:用户登录准备工作比较知名的开源XMPP服务器:一个是Openfire,一个是ejabberdOpenfire 使用 Java 语言编写,比较容易上手,地址:http://www.igniterealtime.org/projects/openfire/ejabberd 使用 Erlang 语言编写,是一款非常知名的 Erlang 开源项目,地址:http://www.ejabberd.im/安装 ejabberd,可以参考我的博客:【ejabberd】安装XMPP服务器ejabberd(Ubuntu 12.04)搭建一个自己的 XMPP 服务器之后,就让我们开始吧!连接服务器1、新建一个 XM 阅读全文
posted @ 2013-05-10 16:58 Anthony Li 阅读(25784) 评论(0) 推荐(1) 编辑
【iOS XMPP】使用XMPPFramewok(一):添加XMPPFramework(XCode 4.6.2)
摘要:XMPPFrameworkGitHub:https://github.com/robbiehanson/XMPPFramework获取源代码git clonehttps://github.com/robbiehanson/XMPPFramework.gitcheckout XMPPFramework 一个最新的branch添加依赖> 拷贝 <XMPPFramework>/Vendor/CocoaLumberjack 到项目根目录下,add files...,选择CocoaLumberjack 文件夹> 同样的步骤,拷贝CocoaAsyncSocket 和 KissXML 阅读全文
posted @ 2013-05-09 15:49 Anthony Li 阅读(19003) 评论(5) 推荐(1) 编辑
【深入学习iOS开发(一)】Objective-C Reflection(Objective-C 反射机制)
摘要:Objective-C Reflection(Objective-C 反射机制)NSObject 方法除了个别例外,Cocoa 中大部分类都是 NSObject 的子类,因此大部分对象都继承了它所定义的方法。NSObject 提供了一些简单的查询运行时系统信息的方法:- (BOOL)isKindOfClass:(Class)aClass Returns a Boolean value that indicates whether the receiver is an instance of given class or an instance of any class that inherit 阅读全文
posted @ 2013-05-05 15:50 Anthony Li 阅读(9536) 评论(0) 推荐(1) 编辑
【深入学习iOS开发(五)】Archive(归档)
摘要:Archive(归档)Archives provide a means to convert objects and values into an architecture-independent stream of bytes that preserves the identity of and the relationships between the objects and values.1、归档与解档ArchiveRootObject[NSKeyedArchiver archiveRootObject:[contentTextField text] toFile:[self archi 阅读全文
posted @ 2013-05-02 15:54 Anthony Li 阅读(1807) 评论(0) 推荐(0) 编辑
【CocoaPods】CocoaPods:Objective-C依赖库管理(XCode 4.6)
摘要:github:https://github.com/CocoaPods/CocoaPods官方网站:http://www.cocoapods.org/1、安装 RubyGemsRubyGems 官方网站:http://rubygems.org/RubyGems 下载地址:http://rubygems.org/pages/download下载成功后,解压缩打开终端,cd 打开执行命令:sudo ruby setup.rb2、安装 CocoaPods终端,执行命令:sudo gem install cocoapods报错:Building native extensions. This coul 阅读全文
posted @ 2013-03-21 15:31 Anthony Li 阅读(1867) 评论(0) 推荐(0) 编辑
【Three20】手动添加Three20(XCode 4.6)
摘要:github:https://github.com/facebook/three20官方网站:http://three20.info参考:http://chepri.com/visual-guide-manually-adding-three20-xcode-4-project/1、添加Three20.xcodeproj“add Files to”,在three20/src/Three20目录下,选择Three20.xcodeproj,在弹出的对话框中,请保证反选“Copy items into destination group's folder”选项,点击“add”按钮添加2、添加 阅读全文
posted @ 2013-03-18 17:29 Anthony Li 阅读(748) 评论(0) 推荐(0) 编辑
【Wax】使用Wax (framework方式,XCode 4.6)
摘要:前情提示:【Wax】使用Wax (非framework方式,XCode 4.6)这次,将以framework的方式来使用Wax那么,让我们开始吧!!!准备工作:下载wax.framework:https://github.com/downloads/probablycorey/wax/wax.framework.zip新建iOS应用项目,使用Empty Application模板,命名为WaxDemoAdd Files...添加wax.framework,选择“Copy items into destination group's folder”复选框1、加载luaAppDelegat 阅读全文
posted @ 2013-02-25 15:48 Anthony Li 阅读(1207) 评论(0) 推荐(0) 编辑
【Wax】使用Wax (非framework方式,XCode 4.6)
摘要:WaxWax is a framework that lets you write native iPhone apps in Lua.Github地址:https://github.com/probablycorey/wax准备工作:git clonehttps://github.com/probablycorey/wax.git打开终端,cd wax执行命令:rake install,安装XCode template打开XCode,却没有发现Wax的template……Google之后,发现貌似只支持XCode 3如此这般,我们只能手动安装Wax了1、添加文件新建iOS应用项目,使用Emp 阅读全文
posted @ 2013-02-25 11:47 Anthony Li 阅读(1009) 评论(0) 推荐(0) 编辑
【iOS Web App】嵌入 Cordova WebView 到 iOS(XCode 4.6,Cordova 2.3.0+)
摘要:参考:Embedding Cordova WebView on iOS开发环境:XCode 4.6Cordova 2.3.0准备工作<1 新建config.xml文件<?xml version="1.0" encoding="UTF-8"?><cordova> <preference name="KeyboardDisplayRequiresUserAction" value="true" /> <preference name="SuppressesInc 阅读全文
posted @ 2013-02-01 11:32 Anthony Li 阅读(10617) 评论(2) 推荐(0) 编辑
【iOS SOAP】基于第三方开源项目:wsdl2objc
摘要:wsdl2objc地址:http://code.google.com/p/wsdl2objc/服务器端,参考:【Web Service】Apache Tuscany发布Web Service准备工作:svn checkouthttp://wsdl2objc.googlecode.com/svn/trunk/<生成代码运行WSDLParser项目WSDL栏输入wsdl的地址Output Location栏输入输出代码的目录点击Parse WSDL按钮生成代码:<添加到项目<支持libxml2TARGETS-> Build Settings -> Linking -& 阅读全文
posted @ 2013-01-18 15:16 Anthony Li 阅读(4909) 评论(0) 推荐(1) 编辑
【iOS Clock Synchronization】iOS时钟同步:基于NTP协议的开源项目ios-ntp
摘要:项目地址:https://github.com/jbenet/ios-ntpNTP 维基百科:http://en.wikipedia.org/wiki/Network_Time_Protocol准备工作git clone 项目 ios-ntphttps://github.com/jbenet/ios-ntp.gitgit clone 项目 CocoaAsyncSockethttps://github.com/robbiehanson/CocoaAsyncSocket.git1、添加frameworks解压缩ios-ntp/release/ios-ntp.tar.gz,得到ios-ntp.fra 阅读全文
posted @ 2013-01-15 10:29 Anthony Li 阅读(1719) 评论(0) 推荐(0) 编辑
【iOS QR Code】集成ZXingWidget(XCode Version 4.5.2,iOS 6.0 SDK)
摘要:1、添加ZXingWidget打开目录ZXing/iphone/ZXingWidget,将ZXingWidget.xcode文件拖拽添加到项目中2、设置Link Binary With LibrariesTARGETS -> Build Phases -> Link Binary With Libraries点击+,添加libZXingWidget.a3、设置Target DependenciesTARGETS -> Build Phases -> Target Dependencies点击+,添加ZXingWidget4、设置Header Search PathsTA 阅读全文
posted @ 2012-12-24 15:13 Anthony Li 阅读(4803) 评论(0) 推荐(0) 编辑
iOS开源库
摘要:ASIHTTPRequest简介:HTTP请求http://allseeing-i.com/ASIHTTPRequest/SBJson简介:JSON解析http://stig.github.com/json-framework/FMDB简介:SQLite数据库https://github.com/ccgus/fmdbwsdl2objc简介:SOAPhttp://code.google.com/p/wsdl2objc/ios-ntp简介:NTPhttps://github.com/jbenet/ios-ntpCocoaAsyncSocket简介:Sockethttps://github.com/ 阅读全文
posted @ 2012-12-24 13:15 Anthony Li 阅读(511) 评论(1) 推荐(0) 编辑
iOS内存管理规则
摘要:当你使用new、alloc或copy方法创建一个对象时,该对象的保留计数器为1。当不再使用该对象时,你要负责向该对象发送一条release或autorelease消息,这样,该对象将在其使用寿命结束时被销毁。当你通过任何其它方法获得一个对象时,则假设该对象的保留计数器值为1,而且已经被设置为自动释放,你不需要执行任何操作来确保该对象被清理。如果你打算在一段时间内拥有该对象,则需要保留它并确保在操作完成时释放它。如果你保留了某个对象,你需要(最终)释放或自动释放该对象。必须保持retain方法和release方法的使用次数相等。获得途径 临时对象 拥有对象alloc/... 阅读全文
posted @ 2011-11-24 15:23 Anthony Li 阅读(525) 评论(0) 推荐(0) 编辑


博客园博客已停止更新,博客地址:dyinigbleed.com