background preloader

Xcode

Facebook Twitter

Iphone 线程 NSCondition NSThread - xinghexiyue的专栏. 多线程在各种编程语言中都是难点,很多语言中实现起来很麻烦,objective-c虽然源于c,但其多线程编程却相当简单,可以与java相媲美。 这篇文章主要从线程创建与启动、线程的同步与锁、线程的交互、线程池等等四个方面简单的讲解一下iphone中的多线程编程。 一、线程创建与启动 线程创建主要有二种方式: - (id)init; // designated initializer- (id)initWithTarget:(id)target selector:(SEL)selector object:(id)argument; 当然,还有一种比较特殊,就是使用所谓的convenient method,这个方法可以直接生成一个线程并启动它,而且无需为线程的清理负责。 这个方法的接口是: + (void)detachNewThreadSelector:(SEL)aSelector toTarget:(id)aTarget withObject:(id)anArgument 前两种方法创建后,需要手机启动,启动的方法是: 二、线程的同步与锁要说明线程的同步与锁,最好的例子可能就是多个窗口同时售票的售票系统了。 // SellTicketsAppDelegate.h import <UIKit/UIKit.h> @interface SellTicketsAppDelegate : NSObject <UIApplicationDelegate> {int tickets;int count; NSThread* ticketsThreadone; NSThread* ticketsThreadtwo; NSCondition* ticketsCondition; UIWindow *window;} @property (nonatomic, retain) IBOutlet UIWindow *window; @end SellTicketsAppDelegate.m 文件 三、线程的交互线程在运行过程中,可能需要与其它线程进行通信,如在主线程中修改界面等等,可以使用如下接口: - (void)performSelectorOnMainThread:(SEL)aSelector withObject:(id)arg waitUntilDone:(BOOL)wait 包含如下线程操作方法: 推荐方式.

How to add CoverFlow Effect on your iPhone App – OpenFlow - microchenhong的专栏. Hello all, The main criteria of this post is to help you add a cool effect called the “cover flow/open flow” effect to any of your iphone apps. This is cool in two ways actually. One it adds animation kind of effect to your app and the other, its very easy to build too. I got to learn about this effect when I was working on my “pianos” app where in i’ll have bunch of animals to select which would be displayed as a menu using this “cover flow” effect. Once a particular animal is selected your piano view for that animal comes up. My piano app will be out soon and you can check that out. The source for this post is the link displayed below. “ Based on his post I have simplified things further.

Creating the project Firstly Create a new “view based” project with project name like “CoverFlow”. Add the OpenFlow source code to your project Adding OpenFlow source code to the project. Adding frameworks. Iphone应用程序开发指南(读书笔记 2 ) - 今年我们二十五六 - 51CTO技术博客. 创建一个新的视图对象时,需要为其分配内存,并向该对象发送一个initWithFrame:消息,以对其进行初始化。 举例来说,如果您要创建一个新的UIView 类的实例作为其它视图的容器,则可以使用下面的代码: 在iPhone 程序中,有两个地方最常用于创建视图和子视图, 它们是应用程序委托对象的applicationDidFinishLaunching:方法和视图控制器的loadView 方法。 调用父视图的addSubview:方法来添加视图,该方法将一个视图添加到子视图列表的最后。 调用父视图的insertSubview:...方法可以在父视图的子视图列表中间插入视图。 调用父视图的bringSubviewToFront: 、sendSubviewToBack: 、或 exchangeSubviewAtIndex:withSubviewAtIndex:方法可以对父视图的子视图进行重新排序。 调用子视图(而不是父视图)的removeFromSuperview 方法可以将子视图从父视图中移除。

创建一个带有视图的窗口 - (void)applicationDidFinishLaunching:(UIApplication *)application { // Create the window object and assign it to the // window instance variable of the application delegate. window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; window.backgroundColor = [UIColor whiteColor]; // Create a simple red square CGRect redFrame = CGRectMake(10, 10, 100, 100); UIView *redView = [[UIView alloc] initWithFrame:redFrame]; redView.backgroundColor = [UIColor redColor]; // Create a simple blue square // Add the square views to the window.

Net web service

Java. Button Sounds. Table View Programming Guide for iOS: A Closer Look at Table-View Cells. RGB to Color Name Mapping(Triplet and Hex) 给TableView添加背景 iPhone SDK提供了默认的几个TableView样式,但是如果想提供更个性化的样式就需要自_知之為知之,是知也. Emacs. Ios - Core Data: NSPredicate for many-to-many relationship. ("to-many key not allowed here") Programming The iPhone For Accessibility By The Visually Impaired. Per Busch, a blind iPhone user from Germany, has been on a crusade to raise developer awareness about VoiceOver, a new-in-3.0 accessibility enhancement. Per’s is a noble quest, so we’ll do our part here: VoiceOver Over View VoiceOver, says Apple, “describes an application’s user interface and helps users navigate through the application’s views and controls, using speech and sound.”

Apple offers a concise document that describes how accessibility is delivered with iPhone 3.0. I’ll further distill what’s involved: VoiceOver literally describes what’s on-screen in spoken word. You can label your UI from an inspector panel in Interface Builder. Supporting this level of accessibility isn’t hard. Standard UIKit controls/views support accessibility by default. Limitations, And A Wish-List For Apple Per shared an email conversation with Daniel Ashworth, CEO & Chief Architect of Quokka Studios about the limitations of the VoiceOver. The Business Case For Accessibility. Zip-framework - A cocoa framework for reading from and writing to zip archives.

iOS. Getting Content from a URL - iPhone Dev Forums. Java正则表达式详解 _天极网. Downloads (2009-2010 Winter) | CS 193P iPhone Application Development. Zlib Home Site. Find icons, free icons in VISTAICO TOOLBAR, (Icon Search Engine)

Icon

Interactive § Icons for people who need icons. NSSortDescriptor - 俺是一个瓜娃!!! - ItEye技术网站. Specifying Sorts Using NSSortDescriptor Let’s assume, as an example, that we have an array (an instance of NSArray) containing instances of a custom class, Employee (that meets the requirements set out in “Requirements of Collection Objects”). The Employee class has attributes for an employee’s first and last name (instances of NSString), date of hire (an instance of NSDate), and age (an instance of NSNumber). 1:Sorting the array by the age key ageDescriptor = [[[NSSortDescriptor alloc] initWithKey:@"age" ascending:YES] autorelease]; sortDescriptors = [NSArray arrayWithObject:ageDescriptor]; sortedArray = [employeesArray sortedArrayUsingDescriptors:sortDescriptors]; ageDescriptor = [[[NSSortDescriptor alloc] initWithKey:@"age" ascending:YES] autorelease]; sortDescriptors = [NSArray arrayWithObject:ageDescriptor]; sortedArray = [employeesArray sortedArrayUsingDescriptors:sortDescriptors]; 2:Sorting the array by the age and date of hire key Specifying Custom Comparisons 写道.

Cocoa的单态(singleton)设计模式 - Cocoa China 苹果开发中文站. Objective-C 中类似于C#中trim的方法(去掉字符串前后空格) - 鬼手如冰.

Calendar

Tenius iPhone Icon Set | Icons Depot. The Tenius iPhone Icon Set is an elegant and attractive set of icons designed for the iPhone. Price: FreePackage: Dozens of icons suitable for use on the iPhone and possibly as web icons.License: Free, no specific terms provided (iPhone use). iPhone Fonts From Mac OS X. Xcode-globalization. 开发技术-中国移动开发者社区.

把Iphone程序连接真机调试--中国移动开发者社区. 对于真机调试,首先要在苹果网站上注册APP ID,以及购买iPhone Develop Program(iDP) 开发者授权,99美元。 然后要创建证书请求CSR,创建步骤如下: 设置OCSP和CRL为关闭状态。 Mac OS 中,打开应用程序,找到 钥匙串访问(Keychain Access)工具打开主菜单 - 证书助理(Certificate Assistant)-从证书代理请求证书(Request a Certificate From a Certificate Authority)输入iDP注册时的email,用户名自定义,选择“存储到磁盘”,选择‘Let me specify key pair information’。 选择保存路径,证书请求创建成功。 1.接下来就可以登录iDP Portal提交证书请求了,到这个页面 点Development,‘Request Certificate’,然后点Browser,添加刚才生成的证书,点submit。 点击Approve,一分钟后会生成一个.cer文件。 下载Download,双击它。 单击“好”,就可以把certificate加入到keychain里面了。 2. 打开XCODE,在window菜单下,点击Organizer,出现这个页面(前提是要连上真机哦) identifier那一行字符就是device id了,复制它。 点击“Add Devices” 给device name取个自己的名字,把之前复制的字符粘贴到Device ID那,点下面的submit就可以了 3. 申请IDP图文教程 | App Store上线/推广/销售讨论区 - CocoaChina 开发讨论区 最热的iOS开发论坛| 最热的Mac开发论坛 | 最热的iPhone开发论坛 | 最热的iPad开发论坛.

在cocoachina受益良多,现写一个idp申请的图文教程回报cocoachina~ 图1 申请账号后点击图1中的join the iphone developer program图2 点击图2中的enroll now图3 继续点击图3中的enroll now图4 由于之前注册过账号,这里直接先使用已存在账号,点击continue图5 图5中是选是个人idp还是公司还是299$的(299$的没有使用过,不多作介绍,公司的可以多个user,但是发布只能是最高权限的人发布,同时注册时需要提供公司营业执照)图6 图6中就照实添写,注意的是下面内容是和信用卡一样的,地址是账单地址。 输入完之后会显示图7的内容,核对后点击continue图8 图9 下载图8中的pdf,添写里面的表格,注意,enrollment id,person id,fullname,email,phone要与图8中的一致,如果误关了图8页面请照图9重新打开pdf可以用ps在上面直接打字,签名可以手写之后照相然后P上。 照图9新建一个用户,并选中用户保存 图11 图12 图13 图14 照图10选择国家,图11中选择lookup your bank,图12,13搜索到后选择银行 图15 依照图14写银行账号,用户名,钱选USD吧 图16 图15确认 图17 完成后会出现图16的效果。 小学语文老师教过,读文章要先从头到尾看一遍再细读。 希望各位申请好的大大帮助检查下错误,以免误导别人。 使用XCode联机调试你的iOS应用(2010年10月新版) | Swfdong's Blog. 本文仅发布在Swfdong’s blog(blog.swfdong.org)及9ria天地会(bbs.9ria.com),转载请注明出处。 今天发烧了,带病完成这篇文章,希望能对大家有所帮助:-) 说起来,iDP(iOS Developer Program)的申请并不难,填写所有信息,然后发一封邮件就可以了。 而在iDP申请完成之后,很多开发者要做的第一件事就是在设备上测试应用,因为很多特性是模拟器不支持的(比如多点触控,重力感应等),今天带给大家的就是联机调试iPhone程序的完成流程。

准备工作很简单,用于开发的Mac电脑一台,运行Mac OS X 10.6.4,XCode版本3.2.4 然后登录到Apple的iOS Dev Center: 登录后在右上方点击”iOS Provisioning Portal“,进入如下页面: 点击“Launch Assistant”,出现如下窗口: 这一页没耐心看的就直接点“Continue”,进行下一步操作。 创建一个App ID,在输入框中输入描述,一般来说直接写应用名字就可以了,但是要注意不能含有一些特殊字符,点击“Continue”继续。 在Device Description一栏输入设备描述,如“My iPhone 3Gs”; 在Device ID一栏输入设备ID,从XCode的顶部工具栏->Window菜单->Organizer项开启Organizer窗口,选中要用于调试的设备,Indetifier项就是我们需要的设备ID,复制至Device ID栏即可,点击“Continue”继续。 这里直接点击Continue继续,不要关闭网页。

打开”钥匙串访问”程序(位于Mac OS X的“应用程序->使用工具”目录下),打开屏幕左上方“钥匙串访问”菜单,点选“证书助理->从证书颁发机构求证书”项。 在出现的窗口中填写证书信息,电子邮件地址一栏填写申请iDP时使用的电子邮箱,常用名称是待申请的证书名,比如可以填写“My iOS Dev Key”;别忘了选中下面的“储存到磁盘”,点击“继续”。 此时证书签名请求就生成好了,我们马上就要用到这个请求文件。 回到网页中,点击“选取文件”按钮,选刚刚择生成好的签名请求文件,点击“Continue”继续。 JSON/Atom Custom Search API - JSON/Atom Custom Search API - Google Code. A strict JSON parser and generator for Objective-C. Json-framework - A strict JSON parser/generator for Objective-C. Add Three20 to your Project | October 6, 2010 | Three20. Before you begin using Three20 in your project, you should decide what directory layout works best for you. Recommended: Shared Layout In this layout, Three20 is shared between multiple projects. If you need to make project-specific modifications to Three20, use git branches. If you are unfamiliar with git, it's highly recommended that you learn the basics in order to take advantage of this directory layout. Directories Example workflow Submodule Layout In this layout, Three20 lives directly within each project's folder as a git submodule.

There are two primary means of adding Three20 to your project. Automatically add Three20 to your project Three20 includes a python script that adds Three20 to Xcode iOS projects. In order to add Three20 to your project, it's recommended that you do the following: This will add the Three20 module and all of its dependencies to your project. If your target's name does not match your project's name, you will need to set it explicitly. Apple « Sealyu's Blog.

320

iPhone开发技巧之网络篇(4)— 确认网络环境 3G/WIFI | YIFEIYANG. 博主:易飞扬原文链接 : iPhone开发技巧之网络篇(4)--- 确认网络环境 3G/WIFI 开发Web等网络应用程序的时候,需要确认网络环境,连接情况等信息。 如果没有处理它们,是不会通过Apple的审查的。 Reachability Apple 的 例程 Reachability 中介绍了取得/检测网络状态的方法。 然后将 SystemConfiguration.framework 添加进工程: Reachability 中定义了3种网络状态。 NotReachable无连接ReachableViaCarrierDataNetwork (ReachableViaWWAN)使用3G/GPRS网络ReachableViaWiFiNetwork (ReachableViaWiFi)使用WiFi网络 比如检测某一特定站点的接续状况,可以使用下面的代码: 检测当前网络环境 程序启动时,如果想检测可用的网络环境,可以像这样。 连接状态实时通知 网络连接状态的实时检查,通知在网络应用中也是十分必要的。 Reachability 1.5 Reachability 2.0. AppDevMag. Gdata-objectivec-client - Google Data APIs Objective-C Client Library. The Google data APIs provide a simple protocol for reading and writing data on the web. Many Google services provide a Google data API.

This library is for Google XML APIs. For JSON APIs, use the Google APIs Client Library for Objective-C. Each of the following Google services provides a Google Data API supported by this library: This library should no longer be used for these APIs: Google Analytics (superseded by a JSON API) Blogger (superseded by a JSON API) Book Search (superseded by a JSON API) Calendar (superseded by a JSON API) Code Search (deprecated) Documents List (deprecated; superseded by the Drive JSON API) Finance (deprecated) Health (deprecated) Maps (deprecated) YouTube (superseded by a JSON API) The Google Data APIs Objective-C Client Library provides an iPhone static library, a Mac OS X framework, and source code that make it easy to access data through Google Data APIs.

To browse the Google Objective-C client framework source code, visit the Source tab. 10 iOS Libraries to Make Your Life Easier. The operating system that powers Apple’s iPhone and iPad devices, iOS, has proved incredibly popular with developers. A large part of this is almost certainly due to the opportunity that the App Store gives developers to make money, but the great development tools that Apple provide, in the form of XCode and Interface Builder, and also the Objective-C programming language, which iOS developers are required to use, certainly play their part.

The iOS SDK that developers use to build iPhone and iPad apps is relatively low level, requiring the developer to do a lot of work to get their app up and running. Fortunately there are lots of third party libraries available that provide useful functionality that can make your life as an iOS developer much easier. Here we discuss 10 of the best: MBProgressHUD – Progress Indicator Library Many official Apple apps have a nice translucent progress display. ASIHttpRequest – HTTP Network Library JSON Framework – JSON Support CorePlot – 2D Graph Plotter. iOS高效开发必备的10款Objective-C类库_风叮叮咚咚. {*style:<b><b> <b>MBProgressHUD(进展指示符库) </b> <b>地址: </b> 苹果的应用程序一般都会用一种优雅的,半透明的进度显示效果,不过这个API是不公开的,因此你要是用了,很可能被清除出AppStore。 而 MBProgressHUD提供了一个替代方案,而且在用户角度上,实现的效果根本看不出和官方程序有什么差别。 同时还提供了其他附加功能,比如虚拟进展 指示符,以及完成提示信息。 整合到项目里也很容易,这里不细谈了。 <b>ASIHttpRequest(HTTP Network库) </b> <b>地址: </b> iPhone当然也有自己的HTTP Network API,那为什么要用ASIHttpRequest呢?

<b>JSON Framework(JSON支持) </b> <b>地址: </b> 如果你做的应用和网站服务器有交互,那就得用到JSON了。 </b></b>*} {*style:<b><b> </b></b>*} {*style:<b> </b>*} 大体来讲就是iPhone上的Facebook login,完全支持Facebook Graph API和the older REST api。 用SDWebImage调用网站上的图片,跟本地调用内置在应用包里的图片一样简单。 [imageView setImageWithURL:[NSURL URLWithString:@" 类似的功能在Three20里也有,这个过会再说。 名字就说明一切了。 CorePlot有很多解决方案将你的数据可视。 Three20 Custom Cells iPhone Tutorial | Matt's Portfolio. This tutorial is outdated, proceed at your own risk. Introduction to custom three20 cells In my last tutorial I showed you how to use CSS-like stylesheets in your iPhone Apps. Although I did make a custom cell I didn’t really show how this is done, and I’ve decided to go into a bit more detail. In this tutorial I am going to show you how to make custom table cells in your iPhone Apps using Joe Hewitt’s Three20 library .

Custom cells are very useful, they let you do things like this: But it’s worth mentioning that i’m not going show you how to make a complete iPhone App, nor install the Three20 library in your Apps (there is already a guide on how to do this on the three20 github page ). By the way, all my Three20 tutorials are available on gitHub .

First things first, There are cells, and there are fields. control the labels, images, interface elements, etc that are actually displayed when a table cell is rendered. The code that styles the above cell (BNSubtextTableFieldCell) looks like this: we. 晚上十点断桥见 - 朋友们 + 工作备忘 + 生活点滴 | diwufet # gmail.com. Three20. Brad’s Beef » Simple iPhone Tutorial: Password Management using the keychain by using SFHFKeychainUtils « Sealyu's Blog. Blog : The Secret Life of _cmd. WWDC 2010 Session Videos. WWDC 2010 Session Videos. Getting Started with Objective Resource. iPhone on Rails and ObjectiveResource; Making communication between the iPhone and a Rails web-service pain-free.

Yfactorial/objectiveresource at master - GitHub. 总结个人经验,史上最完整的IDP申请直到软件上架销售流程 | App Store上线/推广/销售讨论区 - CocoaChina 开发讨论区 最热的iOS开发论坛| 最热的Mac开发论坛 | 最热的iPhone开发论坛 | 最热的iPad开发论坛. 50+ Open Source iPhone Apps For iPhone Developers. Colloquy - IRC Client for iPhone, iPod touch, and iPad on the iTunes App Store. 50款经典iPhone开源应用及源码 - SLJ.me - 申力军. 开源iphone应用程序 - lovebirdegg's world - JavaEye技术网站. O'Reilly iPhone Game Development | Download O'Reilly iPhone Game Development software for free. iOS Developer Library.