Iphone开发
文章平均质量分 89
xinghexiyue
这个作者很懒,什么都没留下…
展开
-
播放器
开发 http://developer.apple.com/library/ios/navigation/转载 2011-04-06 16:10:00 · 404 阅读 · 0 评论 -
隐藏Status Bar
<br />读者可能知道一个简易的方法,那就是在程序的viewDidLoad中加入<br /> [[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];<br /> 此法可以隐藏状态条,但问题在于,状态条所占空间依然无法为程序所用. 本篇介绍的方法依然简单,但更为奏效:是通过简单的3个步骤,在plist中加入一个键值来实现.<br /> 1. 点击程转载 2011-04-10 19:24:00 · 557 阅读 · 0 评论 -
Geolocation API Network Protocol
<br />http://code.google.com/intl/zh-CN/apis/gears/geolocation_network_protocol.html#request<br /> package cn.MyAndroid.Test;<br />import java.io.BufferedReader;import java.io.InputStreamReader;<br />import org.apache.http.HttpEntity;import org.apache.http转载 2011-04-13 19:50:00 · 1770 阅读 · 0 评论 -
使用libcurl连接https服务器
问题<br />你是否也想让自己的 iPhone 应用程序连接 https 服务器呢?下面我就介绍一下其使用方法。<br />通常使用 Objective-C 的 NSURLConnection 连接有证明书的 https 服务器时会出现验证错误,我们可以使用私有API — setAllowsAnyHTTPSCertificate:forHost 来解决这个问题。如果是 Cocoa 的应用程序应该是没有什么问题,但是用在 iPhone 上,很可能过不了 App Store 的审查。<br />所以这里我们使转载 2011-04-15 10:20:00 · 5118 阅读 · 0 评论 -
Easy inclusion of OpenSSL into iOS projects
<br />Oddly, iOS doesn’t provide any OpenSSL implementation at all — If you want to do anything with crypto (like checking signatures, checksumming, etc.), you have to build in the library yourself.<br />I came across a great XCode project wrapper for Open转载 2011-04-15 19:40:00 · 617 阅读 · 0 评论 -
How To Compile OpenSSL for the iPhone
<br />This is a quick tutorial to show you how to minimally compile a version of the openssl and crypto libraries for the iPhone/iPad.Download and Configure OpenSSL<br />First thing to do is grab the openssl source. You can get that here. I’ll be using o原创 2011-04-15 10:17:00 · 1296 阅读 · 0 评论 -
OpenSSL-安装与配置指南作者
OpenSSL-0.9.8g :金步国 -------------------------------------------------------------------------------- 版权声明本文作者是一位自由软件爱好者,所以本文虽然不是软件,但是本着 GPL 的精神发布。任何人都可以自由使用、转载、复制和再分发,但必须保留作者署名,亦不得对声明中的任何条款作任何形式的修改,也不得附加任何其它条件。您可以自由链接、下载、传播此文档,但前提是必须保证全文完整转载,包括完整的版权信息和作译者声转载 2011-04-15 20:01:00 · 771 阅读 · 0 评论 -
iPhone App with compiled OpenSSL 1.0.0a Library
<br />This is a tutorial for using self-compiled builds of the OpenSSL-library on the iPhone. You can build apps with XCode and the official SDK from Apple with this. I also made a small example-app for using the libraries with XCode and the iPhone/iPhone-转载 2011-04-15 10:23:00 · 1297 阅读 · 0 评论 -
ASIHTTPRequest 详解, http 请求终结者
目录目录发起一个同步请求创建一个异步请求队列请求请求队列上下文ASINetworkQueues, 它的delegate提供更为丰富的功能取消异步请求安全的内存回收建议向服务器端上传数据下载文件获取响应信息获取请求进度cookie的支持大文件断点续传ASIDownloadCache 设置下载缓存多种的缓存并存缓存策略缓存存储方式缓存其它特性实现自定义的缓存使用代理请求ASIHTTPRequest, 请求的其它特性<br />ASIHTTPRequest是一款极其强劲的HTTP访问开源项目。让简单的API完成复转载 2011-04-18 20:06:00 · 1122 阅读 · 0 评论 -
NSTimer实现倒计时 及 定时器用法
<br />-(void)awakeFromNib<br />{<br /> // Create the rendering loop timer<br /> renderTimer = [[NSTimer scheduledTimerWithTimeInterval:<br /> 0.1 // a 100ms time interval<br /> targe转载 2011-04-10 15:10:00 · 2354 阅读 · 0 评论 -
iphone代码集2
1. stringWithFormat 用法: <br /> [NSString stringWithFormat:@"Hight: %d°%@ Low: %d°%@", [Temp],@"C",[lTemp],@"C"];<br /> <br /> NSString to NSData:NSString* str=@"kilonet";<br /><br />NSData* data=[str dataUsingEncoding:NSUTF8StringEncoding]; <b转载 2011-04-10 15:02:00 · 2408 阅读 · 1 评论 -
iphone 常用代码集1
<br />1. 随机数:srandom(time(NULL)); //随机数种子<br /><br />id d = random(); // 随机数<br /> <br /> 2. 视频播放: MPMoviePlayerController *moviePlayer;<br /> moviePlayer = [[MPMoviePlayerController alloc]<br /> initWithContentURL:[NSURL fileURLWi转载 2011-04-08 19:12:00 · 1705 阅读 · 1 评论 -
防止视频前的黑屏
<br />Hi<br />In order to make a seamlessly looping video using MediaPlayer (which annoyingly fades in and out of movies) I used the trick of setting the MP’s background to clearColor and loading a JPG of the first frame into the Main Window, so the movie转载 2011-04-08 19:21:00 · 804 阅读 · 0 评论 -
MyMoviePlayerController.h 播放器
<br /> MoviePlayerController的初始化可以接受一个NSURL的参数,指定播放的视频资源文件,既可以是本地的,也可以是远程的。在旧的SDK中,MoviePlayerController只要实例化后调用play方法就可以自动全屏播放了,但在新SDK中你会发现同样的代码不会有任何效果,必须另外作些Hack处理(这意味着,如果你开发所用的SDK是3.2之前的,则编译后的程序只能发布到iPhone OS 3的设备上运行,所以赶紧升级你的SDK到4.0或更高版本吧)。我们把这些处理与Movie转载 2011-04-07 19:39:00 · 1308 阅读 · 0 评论 -
iphone 线程 NSCondition NSThread
<br />多线程在各种编程语言中都是难点,很多语言中实现起来很麻烦,objective-c虽然源于c,但其多线程编程却相当简单,可以与java相媲美。这篇文章主要从线程创建与启动、线程的同步与锁、线程的交互、线程池等等四个方面简单的讲解一下iphone中的多线程编程。<br />一、线程创建与启动<br />线程创建主要有二种方式: -(id)init;// designated initializer-(id)initWithTarget:(id)target selector:(SEL)selecto转载 2011-04-08 10:04:00 · 8399 阅读 · 4 评论 -
iPhone的九宫格实现代码
iPhone的九宫格实现代码<br />效果图:<br /><br />核心就这2个方法://Power by ieliwb.com<br />- (void)viewDidLoad{<br /> [superviewDidLoad];<br /> <br /> NSArray* imageNames = [NSArrayarrayWithObjects:<br /> @"ico_mobile.png", <br转载 2011-04-08 13:36:00 · 751 阅读 · 0 评论 -
iphone之MPMoviePlayer本地视频 与 远程视频
iphone之MPMoviePlayer 视频播放 iphone的视频播放官方的例子有问题。这次是费了比较长的时间。 原因是在sdk3.2以后。视频这一块官方有很大的改动造成的。<br /> <br />远程视频:<br /><br />本地视频:<br /><br />首先需要引入视频包;<br /><br /><br />代码如下:<br />#import <UIKit/UIKit.h><br />#import <MediaPlayer/MediaPlayer.h><br /> <br />转载 2011-04-08 19:02:00 · 1627 阅读 · 0 评论 -
多线程的使用
多线程的使用与注意事项这一回,主要介绍一下iPhone SDK中多线程的使用方法以及注意事项。虽然现在大部分PC应用程序都支持多线程/多任务的开发方式,但是在iPhone上,Apple并不推荐使用多线程的编程方式。但是多线程编程毕竟是发展的趋势,而且据说即将推出的iPhone OS4将全面支持多线程的处理方式。所以说掌握多线程的编程方式,在某些场合一定能挖掘出iPhone的更大潜力。从例子入手先从一个例程入手,具体的代码参考了这里。还有例程可以下载。多线程程序的控制模型可以参考这里,一般情况下都是使用 管理转载 2011-04-08 13:39:00 · 653 阅读 · 0 评论 -
Playing Video on the iPhone and iPad 播放器
<br />This article discusses the two classes supported in the iPhone SDK for video playback. by Wei-Meng Lee <br />Playing videos is one of the most common tasks on the iPhone. On the iPhone, all videos must be played full-screen. However, on the iPad, thi转载 2011-04-08 18:55:00 · 981 阅读 · 0 评论 -
iphone实例集锦
<br />iPhone 任天堂模拟器<br />http://code.google.com/p/iphonenes/<br />iPhone任天堂模拟器,可以跑很多游戏。<br />iPhone 街机模拟器<br />http://code.google.com/p/iphone-sdl-mame/<br />最著名的街机模拟器MAME的iPhone版。<br />iPhone版 Doom<br />http://code.google.com/p/iphonedoom/<br />经典3D射击游戏Do转载 2011-04-26 14:46:00 · 1581 阅读 · 1 评论