ITeye博客

俺是一个瓜娃!!!

xiaozhao-521 · 共 254 篇文章

iPad及Universal程序总结

1 )请参考这3篇文章: http://www.cocoachina.com/bbs/read.php?tid-21718.html http://www.cocoachina.com/bbs/read.php?tid-19298.html http://www.cocoachina.com/bbs/read.php?tid-15372.html 2)iPad 至少支持一个方向的180度旋转。推荐支持4个方向。并提供横向与纵向的启动画面。 default图片怎么样根据ipad的方向来变换方向???? 3)iPad版尽量提供较iPhone版本增强的内容: http://www.cocoachi…

2011-04-01 16:38 · objective-c · 评论(0) · HTML · BBS · PHP

iPhone开发技巧之私有API — 设备相关信息

使用这些API是要冒一些风险的,一是不会通过 App Stroe 的审核,二是以后比一定还能在高版本的SDK中使用。所以使用之前,三思而行。 先总结一些与设备相关的API。 IMEI 可以在这里下载NetworkController.h, 或者使用你自己dump的版本。使用如下: 复制代码 #import "NetworkController.h" // 获得IMEI // 需要 Message.framework + (NSString*) getDeviceIMEI { NetworkController *ntc = [NetworkController sharedInstance]…

2011-04-01 16:01 · objective-c · 评论(0) · Xcode

iPhone SDK开发:如何显示WiFi提示

如果你的程序中用到了WiFi,想在没有有效WiFi的时候出现如图所示的提示该怎么做? 这个问题被很多人问到过,其实很简单, 只需要在Info.plist中添加如下Key/Value ? [Copy to clipboard] View Code CPP 1 2 3 key name value type value UIRequiresPersistentWiFi Boolean true 一定要是 Boolean类型才可以, iPhone OS 2.1 以后会忽略String类型的YES值 编译运行你的程序, 如果当前WiFi网络没有任何有效设置的话, 就会弹出提示并列出所有可达的WiFi…

2011-03-28 15:48 · objective-c · 评论(0) · OS

iphone开源项目

前几天看到一位会员,总结了一些开源的IOS项目,我结合自己开发过程中用到的一些开源项目,与大家分享。 扫描wifi信息: http://code.google.com/p/uwecaugmentedrealityproject/ http://code.google.com/p/iphone-wireless/ 条形码扫描: http://zbar.sourceforge.net/iphone/sdkdoc/install.html tcp/ip的通讯协议: http://code.google.com/p/cocoaasyncsocket/ voip/sip: http://code.go…

2011-03-25 15:51 · objective-c · 评论(0) · iOS · Google · Facebook · 正则表达式 · json

开源项目--twiterfon

twiterfon 原来是基于sdk2.0 的,现在大部分同学都用sdk3.0以上的版本了,直接下载的项目会编译报错,这个是我修正的版本,开源编译运行(模拟器,sdk3.0)

2011-03-22 16:40 · objective-c · 评论(0)

iPhone网络开发

一:确认网络环境3G/WIFI 1. 添加源文件和framework 开发Web等网络应用程序的时候,需要确认网络环境,连接情况等信息。如果没有处理它们,是不会通过Apple的审查的。 Apple 的 例程 Reachability 中介绍了取得/检测网络状态的方法。要在应用程序程序中使用Reachability,首先要完成如下两部: 1.1. 添加源文件: 在你的程序中使用 Reachability 只须将该例程中的 Reachability.h 和 Reachability.m 拷贝到你的工程中。如下图: 1.2.添加framework: 将SystemConfiguration.fra…

2011-03-17 17:20 · objective-c · 评论(0) · 网络应用 · Google · .net · XML · Apple

iphone上让方形的图片圆角显示

记得头文件:#import <QuartzCore/QuartzCore.h>

2011-03-17 17:07 · objective-c · 评论(0)

iOS-动态调整UITableViewCell的高度

OS-动态调整UITableViewCell的高度 iOS开发文档 , by 友盟翻译组 stefaliu. 大概你第一眼看来,动态调整高度是一件不容易的事情,而且打算解决它的第一个想法往往是不正确的。在这篇文章中我将展示如何使图表单元格的高度能根据里面文本内容来动态改变,同时又不必子类化 UITableViewCell 。你当然可以通过子类化它来实现,但是这样做会使得代码复杂因为设置高度是在图表本身的实例上而不是对单元格操作。下面你将会看到这其实是一件轻而易举的事情。对于图表来说能够动态调整高度是件很有意义的事情,我首先想到的需要这个功能的是当显示一列长度会变化的文本列表时,如果文本内容较…

2011-03-15 21:32 · objective-c · 评论(0) · iOS · OS

UItableView cell 自适应高度

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; cell.textLabel.lineBreakMode = UILineBreakModeWordWrap; cell.textLabel.nu…

2011-03-15 21:27 · objective-c · 评论(0) · Go

发送Http请求(POST GET)的方法

我们知道Http有Get和Post两种方法,我们分开说吧. 另注: 今天讲的方法是同步的请求, 异步的方法我还没试过, 不知道有没有使用异步的需求, 有的话于发上来和大家分享. 1.Get方法 1.1 使用NSMutableURLRequest view plaincopy to clipboardprint? NSURL* url = [NSURL URLWithString:@http://aminby.net]; NSMutableURLRequest* request = [NSMutableURLRequest new]; [request setURL:url]; [reques…

2011-03-01 20:47 · objective-c · 评论(0) · json · .net

Post a UIImage to the web

http://iphone.zcentric.com/2008/08/29/post-a-uiimage-to-the-web/ Post a UIImage to the web So here is something a lot of people have been wondering to do in the forums. How do I take a UIImage or any image and post it to a website. So this will go over how to do that. There are two ways to tackle t…

2011-03-01 20:31 · objective-c · 评论(0) · PHP · Go · json · UP · Web

NSSortDescriptor

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 fir…

2011-02-24 17:51 · objective-c · 评论(0)

NSDateFormatter

Formatter Styles: NSDateFormatterNoStyle, NSDateFormatterShortStyle, NSDateFormatterMediumStyle, NSDateFormatterLongStyle, NSDateFormatterFullStyle. // assume default behavior set for class using // [NSDateFormatter setDefaultFormatterBehavior:NSDateFormatterBehavior10_4]; NSDateFormatter *dateForm…

2011-02-24 17:33 · objective-c · 评论(0) · C · C++ · Objective-C · OS · C#

NSNumberFormatter

Formatter Styles NSNumberFormatterNoStyle, NSNumberFormatterDecimalStyle, NSNumberFormatterCurrencyStyle, NSNumberFormatterPercentStyle, NSNumberFormatterScientificStyle, NSNumberFormatterSpellOutStyle NSNumberFormatter *numberFormatter = [[NSNumberFormatter alloc] init]; [numberFormatter setFormat…

2011-02-24 17:26 · objective-c · 评论(0)

时间运算之Calendars

Creating a Calendar 1:You create a calendar object by specifying an identifier for the calendar you want. Mac OS X provides data for several different calendars—Buddhist, Chinese, Gregorian, Hebrew, Islamic, and Japanese—specified by constants in NSLocale. NSCalendar *japaneseCalendar = [[NSCalenda…

2011-02-24 17:07 · objective-c · 评论(0) · OS