![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
iOS
文章平均质量分 53
totogogo
@CityU of HK
展开
-
iOS: resource file folder in xCode 4
http://stackoverflow.com/questions/5789223/how-do-i-get-the-resources-folder-back-in-xcode-4转载 2012-04-24 09:59:04 · 1084 阅读 · 0 评论 -
iOS: Detecting which UIButton was pressed in a UITableView
http://stackoverflow.com/questions/1802707/detecting-which-uibutton-was-pressed-in-a-uitableview转载 2012-04-24 09:55:12 · 699 阅读 · 0 评论 -
iOS: label如果支持多行
在storyboard选中label控件,在属性窗口里设置"lines"属性为2,然后在"Text"属性里输入string,换行时按ctrl + enter原创 2012-04-24 10:17:10 · 3462 阅读 · 0 评论 -
iOS: load external image and css to UIWebView
对于UIWebView,有2种方法来load web page。最省事的一种是loadRequest method,直接直接以url作参数即可example[webViewloadRequest:[NSURLRequestrequestWithURL:[NSURLURLWithString:newsUrl]]];另一种方式是loadHTMLString method,该方法原创 2012-03-29 01:47:26 · 1720 阅读 · 0 评论 -
iOS: #define
typedef与#define的区别。http://www.sf.org.cn/article/base/200608/18988.html#define 是宏定义,所谓的宏定义,就是将某段代码、地址、字符串等一串的文字,用一个宏来代替。#define是一种预处理。#define与typedef功能类似,但它除了定义数据类型外,还可以定义给变量、语句等等定义,还可以包含参数转载 2012-03-27 11:50:48 · 9925 阅读 · 1 评论 -
iOS app官方开发,调试,发布流程
http://developer.apple.com/library/ios/#DOCUMENTATION/Xcode/Conceptual/ios_development_workflow/00-About_the_iOS_Application_Development_Workflow/introduction.html#//apple_ref/doc/uid/TP40007959-CH1-S原创 2012-03-26 12:22:26 · 984 阅读 · 0 评论 -
iOS: Some issues about push notification
custom data in push notificationhttp://no001.blog.51cto.com/1142339/642817当运行带apns feature的app到真机上后,会弹出错误:"Error Domain=NSCocoaErrorDomain Code=3000 "no valid 'aps-environment' entitleme原创 2012-03-23 00:09:40 · 3418 阅读 · 1 评论 -
iOS: bundle name, bundle display name, bundle identifier...
当你创建一个project时,会要求你输入product name & company identifier,这两个property的值should和你在apple developer member center的“Provisioning Portal”的“App IDs"里创建的bundle identifier (NOT App ID)匹配!如果不匹配的话,push notification原创 2012-03-21 15:19:57 · 38126 阅读 · 3 评论 -
iOS: 用libxml2 and hpple来做html parser
本文是用hpple来做html parser你还可以选择用objective-c html parser https://github.com/zootreeves/Objective-C-HMTL-Parser或直接用libxml2的NSXMLParser http://www.theappcodeblog.com/2011/07/21/iphone-development-t原创 2012-03-19 18:13:15 · 8236 阅读 · 5 评论 -
iOS: 设置全局变量
有几种方法some developers recommend use singleton patter (ref link http://blog.csdn.net/kmyhy/article/details/7026511)方法1:使用静态变量 (不推荐)方法2: 使用singleton pattern (ref link: http://nice.iteye.com/blog/原创 2012-03-14 23:41:37 · 12955 阅读 · 0 评论 -
iOS: iOS5新特性 ARC
apple推荐使用ARC。iOS 5 ARC完全指南.pdf参考文档:Best ARC Tutorial:http://www.raywenderlich.com/5677/beginning-arc-in-ios-5-part-1http://www.raywenderlich.com/5773/beginning-arc-in-ios-5-tutoria转载 2012-03-08 16:41:17 · 1699 阅读 · 0 评论 -
关于iphone/ipad同步,如何避免同步后目录和程序的顺序混乱
http://www.soft4fun.net/ipad-iphone/%E5%A6%82%E4%BD%95%E9%81%BF%E5%85%8D-iphoneipad-%E8%88%87-itunes-%E5%90%8C%E6%AD%A5%E6%99%82%E8%B3%87%E6%96%99%E5%A4%BE%E4%BA%82%E8%B7%91.htm原创 2012-02-16 14:43:53 · 1248 阅读 · 0 评论 -
iOS: 下载等待画面open source lib - MBProgressHUD
MBProgressHUD的原理http://iphonedevelopment.blogspot.com/2010/02/implementing-wait.htmlDownloadhttps://github.com/jdg/MBProgressHUDInstallation下载解压之后,把下列两个file copy to your project即原创 2012-03-28 01:28:54 · 2159 阅读 · 0 评论 -
iOS: How to use "Block"
"Block"是很有用的东东,它实际上就是一个Closure,类似于javascript的closure, java中的匿名listener等。参看http://blog.sina.com.cn/s/blog_67419c420100vl8b.htmlhttp://hechien.posterous.com/block-in-objective-c-20http:/转载 2012-03-27 10:04:42 · 718 阅读 · 0 评论 -
iOS: network reachability
https://developer.apple.com/library/ios/#samplecode/Reachability/Introduction/Intro.htmlhttp://www.raddonline.com/blogs/geek-journal/iphone-sdk-testing-network-reachability/http://ww转载 2012-03-26 17:26:20 · 805 阅读 · 0 评论 -
iOS: install App via OTA
下面是把app放到web site,让其他人通过Over the Air (OTA)下载安装的步骤。前提: 能安装app的device需要被包含在你的provisioning profile里Environment: iOS 5.0 + xcode 4.3ref link: https://help.apple.com/iosdeployment-apps/?lang=原创 2012-03-25 01:45:21 · 12062 阅读 · 1 评论 -
iOS: some notes
* 如何添加 a new file to your project? 首先highlight the group you want to add the file to (usually the project code group),然后点击Xcode左下角的 + button* 如果添加一个existing file to your project? 只需要drag existing fi翻译 2012-03-14 18:01:22 · 1147 阅读 · 0 评论 -
iOS: Storyboard
Storyboard tutorialhttp://maniacdev.com/ios-5-sdk-tutorial-and-guide/xcode-4-storyboard/http://www.raywenderlich.com/5138/beginning-storyboards-in-ios-5-part-1http://www.raywenderlich.co原创 2012-03-09 01:39:07 · 2601 阅读 · 0 评论 -
iOS: NSString应该用initWithFormat? 还是 stringWithFormat?
注意:对于iOS 5的ARC特性来说,两个方法是等价的,不会有memory leak的问题!(ref link: http://stackoverflow.com/questions/7960912/stringwithformat-vs-initwithformat-under-arc)下面文字的参看文档:http://www.cnblogs.com/yjmyzz/archive转载 2012-03-09 00:00:36 · 4088 阅读 · 0 评论 -
Android/iOS Notification feature
notification有3种方案:轮询 (poll)长连接 (socket or http: comet)push notification (c2dm for android, apple notification server foriPhone, 2者的原理是一样的:push server -> apn -> iPhone -> app installed iniP原创 2012-03-07 17:17:37 · 2826 阅读 · 0 评论 -
iOS: delegate机制
一句话:iOS里的 viewComponent.delegate = self;相当于java里的button.addActionListener(this);delegate examplehttp://blog.csdn.net/zhanglei5415/article/details/6133852原创 2012-03-29 22:49:56 · 968 阅读 · 0 评论 -
iOS: Objective C "Selector" 用法
官方文档http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ObjectiveC/Chapters/ocStaticBehavior.html#//apple_ref/doc/uid/TP30001163-CH16-SW1其他文档http://edwardinaction.blogspot转载 2012-03-28 14:09:14 · 1031 阅读 · 0 评论 -
iOS: 在navigation controller里切换到UIViewController的view时黑屏
environment: Xcode 4.3 + iOS 5.0在navigation controller后添加table view controller (UITableViewController),切换到该view时正常,但如果添加的是view controller (UIViewController),那么切换到它时会黑屏。这是xcode 里 view controlle原创 2012-03-20 14:56:02 · 5161 阅读 · 1 评论 -
iOS: UIScrollView的用法
http://blog.csdn.net/mengtnt/article/details/6723245注意: UIScrollView是UITableView和UITextView的超类。转载 2012-03-14 22:47:13 · 1047 阅读 · 0 评论 -
iOS: Convert NSData to NSString
NSString* str = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];原创 2012-03-07 00:03:57 · 2286 阅读 · 0 评论 -
iOS: 第一个iphone app
参考视频:http://s3.amazonaws.com/screencasts.pragmaticstudio.com/013_ib_xcode4.mov1. run Xcode, select "create a new project > view-based application", input "project name" as "HelloWorld",原创 2012-03-05 12:33:24 · 1459 阅读 · 0 评论 -
iOS: App的生命周期
app生命周期的官方文档 http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.htmlViewController的生命转载 2012-03-29 22:38:04 · 562 阅读 · 0 评论 -
iOS: json的处理
json的介绍和格式参看 http://blog.csdn.net/totogogo/article/details/3766163iOS 5之前是使用open source lib: JSONKit (https://github.com/johnezang/JSONKit)iOS 5提供了NSJSONSerialization。NSJSONSerializa原创 2012-03-28 15:02:41 · 11916 阅读 · 0 评论 -
iOS: storyboard (2)
关于interface的基本术语*Viewcontroller:用来处理user和app的交互。*View:它表示user在app上看到的界面,一个app可以有多个view。当然一个view就会对应一个viewcontroller* Scene:viewcontroller + view就可以看作是一个scene.* Segue:A segue表示scene之间的切翻译 2012-03-16 15:23:27 · 8305 阅读 · 0 评论 -
iOS: Segue & Delegate
http://iosdevelopersnote.blogspot.com/2011/10/storyboard-segue-delegate.html转载 2012-03-16 01:59:10 · 1214 阅读 · 0 评论 -
iOS: NSUrlConnection & SSL, Http connection frameworks
java有一个httpclient open source lib来进行http connection操作,android就是使用它iOS自身是通过NSUrlConnection来进行http connection。另外也有一些open source的http connection frameworks:1. ASIHttpRequest (http://allseeing-i.c原创 2012-03-06 23:57:42 · 4279 阅读 · 0 评论 -
iOS: 如何调试程序
2种方法:方法1:使用NSLog,相当于system.out.println,运行时输出信息会出现在console里http://xubenyang.me/413http://xubenyang.me/416不过要注意:NSLog是很耗系统资源的,因此我们必须保证在debug mode时使用NSLog,而在正式发布时能够屏蔽它。方案如下http://www.cocoac原创 2012-03-05 15:49:26 · 1829 阅读 · 0 评论 -
Objective C 基本知识
*XCode、Objective-C、Cocoa是什么?XCode:IDE, 象eclipse, visual studio.Objective-C:编程语言.Cocoa:是一大堆函数库,就好像MFC、.NET、Swing这类玩意,人家已经写好了一堆现成的东西,你只要知道怎么用就可以了。*Objective-C的一些语法的注意点注意点一:我在程序中看到大原创 2012-02-27 01:45:31 · 2423 阅读 · 1 评论 -
iOS: NSUserDefaults issues
NSUserDefaults用于存储一些app setting。当你关闭app之后再打开后,之前存储的setting依然可以从NSUserDefaults里读取。注意:密码最好不要存储在NSUserDefaults里,要存储也必须用AES/DES加密存储,更安全的方法是 https://github.com/ldandersen/scifihifi-iphone把密码存储在NSUserDefa原创 2012-04-18 16:24:47 · 3729 阅读 · 0 评论 -
iOS: Device token and registerForRemoteNotificationTypes, didReceiveRemoteNotification
Device token for an iPhone device生成之后就永远不变吗?不是,if a device is wiped (应该是重装系统), it will get a new device token. 官方网站是这样写的: If the user restores backup data to a new device or computer, or reinsta原创 2012-04-18 19:25:35 · 13805 阅读 · 0 评论 -
iOS: 设计优秀的iPhone通知
http://elya.cc/2011/11/22/notification/转载 2012-04-19 11:09:44 · 1071 阅读 · 0 评论 -
iOS:how to update/renew Provisioning profile
cert过期,添加或删除用于测试的device等,都要对provisioning profile进行更新。对于development provisioning profile,最简单的方法就是在apple developer site里修改你的provisioning profile,然后在xcode的organizer window的"devices tab > Library > Prov原创 2012-03-26 12:29:04 · 4075 阅读 · 0 评论 -
iOS: 在navigation controller里,如何hide navigation bar of first sub controller?
ref link: http://stackoverflow.com/questions/845583/iphone-hide-navigation-bar-only-on-first-page- (void) viewWillAppear:(BOOL)animated{ [self.navigationController setNavigationBarHidden:YE转载 2012-04-23 23:21:30 · 2211 阅读 · 0 评论 -
iOS: using xcode 4.3 to create nav controller + tab view + table view without storyboard
http://www.youtube.com/watch?v=UMpNbCs4mr4转载 2012-05-08 00:31:08 · 805 阅读 · 0 评论 -
iOS: 利用ModalViewController切换View
http://www.youtube.com/watch?v=uDOplXP7r3Ahttp://www.yifeiyang.net/iphone-developer-advanced-7-use-modalviewcontroller-switch-view/转载 2012-05-08 01:11:00 · 923 阅读 · 0 评论