
iPhone
wwwcybcom
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
iPhone中对UIImage对象处理的常用方法
(一)根据给定得图片,从其指定区域截取一张新得图片 -(UIImage *)getImageFromImage{ //大图bigImage //定义myImageRect,截图的区域 CGRect myImageRect = CGRectMake(10.0, 10.0, 57.0, 57.0); UIImage* bigImage= [UIImage原创 2009-08-31 13:30:00 · 11541 阅读 · 1 评论 -
UIImagePickerController
1.你無法得知在相簿中該相片的檔名2.這是我之前的作法,提供您參考:[code]- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingImage:(UIImage *)image editingInfo:(NSDictionary *)editingInfo{ //將ImagePicke转载 2009-10-12 11:35:00 · 974 阅读 · 0 评论 -
iPhone 文件读写
对于一个运行在iPhone得app,它只能访问自己根目录下得一些文件(所谓sandbox).一个app发布到iPhone上后,它得目录结构如下:1、其中得 app root 可以用 NSHomeDirectory() 访问到;2、Documents 目录就是我们可以用来写入并保存文件得地方,一般可通过:NSArray *paths = NSSearchPathForDire转载 2009-10-14 15:00:00 · 1436 阅读 · 0 评论 -
Core Image 学习笔记 - 为照片加边框和EXIF信息
Core Image 学习笔记 - 为照片加边框和EXIF信息。http://blog.codingmylife.com/?p=572,433 views, Cocoa, by Allen Dang.最近迷上了摄影,拍了很多照片之后就想上传跟大家分享。到色影无忌和几个摄影论坛上一看,发现很多人的照片都有不错的边框、水印和拍摄信息(相机类型、光圈、快门、拍摄日期等等…转载 2009-10-22 13:38:00 · 2462 阅读 · 0 评论 -
高阶快捷键组合
<br />alt+cmd +上<br />alt+cmd +左/右 (sdk3.0之后有不同)<br /><br />alt+左/右<br />control+左/右<br />cmd+左/右<br /><br />alt+shift+左/右<br />control+shift+左/右<br />cmd+shift+左/右<br /><br />control+shift+e<br /><br />alt+delete<br />control+ delete<br />cmd+delete<b原创 2010-07-13 09:54:00 · 931 阅读 · 0 评论 -
点击iPhone屏幕,大头针落在触点的代码
<br />如果您希望在 iPhone 应用里加入手动添加大头针的功能,即手指点击屏幕,在接触点上落下一颗大头针,可以看看 CocoaChina 会员“parkerjj”分享的代码<br />- (MKAnnotationView *)mapView:(MKMapView *)mV viewForAnnotation:(id <MKAnnotation>)annotation<br />{<br /> MKPinAnnotationView *pinView = nil;<br /> if(an转载 2010-07-17 14:16:00 · 1195 阅读 · 0 评论 -
App Icons on iPad and iPhone
<br />App Icons on iPad and iPhoneQ: How are the icon files in my application bundle used on iPad and iPhone?<br />A: Below are guidelines for handling icon files for iPhone-only apps, iPad-only apps, and universal apps.<br />IMPORTANT: Icons marked with "原创 2010-08-17 14:18:00 · 459 阅读 · 0 评论 -
App Icons on iPad and iPhone
<br />App Icons on iPad and iPhoneQ: How are the icon files in my application bundle used on iPad and iPhone?<br />A: Below are guidelines for handling icon files for iPhone-only apps, iPad-only apps, and universal apps.<br />IMPORTANT: Icons marked with "原创 2010-08-17 14:17:00 · 462 阅读 · 0 评论 -
App Icons on iPad and iPhone
<br />App Icons on iPad and iPhoneQ: How are the icon files in my application bundle used on iPad and iPhone?<br />A: Below are guidelines for handling icon files for iPhone-only apps, iPad-only apps, and universal apps.<br />IMPORTANT: Icons marked with "原创 2010-08-17 14:17:00 · 1016 阅读 · 0 评论 -
App Icons on iPad and iPhone
<br />App Icons on iPad and iPhoneQ: How are the icon files in my application bundle used on iPad and iPhone?<br />A: Below are guidelines for handling icon files for iPhone-only apps, iPad-only apps, and universal apps.<br />IMPORTANT: Icons marked with "原创 2010-08-17 14:18:00 · 681 阅读 · 0 评论 -
UIImagePickerController
http://blog.airsource.co.uk/index.php/2008/11/11/views-of-uiimagepickercontroller/ Well the new 3.1 OS certainly makes it a lot nicer to change the UI for the UIImagePickerControllerOverlayVi转载 2009-10-12 11:28:00 · 913 阅读 · 0 评论 -
怎样在程序里把png的图片处理成圆角显示。
- (UIImage *) roundCorners: (UIImage*) img{ int w = img.size.width; int h = img.size.height; CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); CGContextRef context = CGBitmap转载 2009-10-02 10:44:00 · 1811 阅读 · 0 评论 -
IPhone短信相关部分研究
http://garfieldfox.spaces.live.com/?_c11_BlogPart_BlogPart=blogview&_c=BlogPart&partqs=cat%3DIPhone短信发送和截获方式一:打开/dev/tty.debug使用AT命令操作,这类代码最早的出现在一些开源项目中,改改基本能用,现有的版本用的就是这种方式。缺点:机器必须破解并必须安装到转载 2009-10-08 14:01:00 · 1035 阅读 · 0 评论 -
在iphone上NSTimer的使用!
NSTimer *mTimer = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector: @selector(moveUp:) userInfo:nil repeats:YES]; -(void原创 2009-09-04 10:14:00 · 511 阅读 · 0 评论 -
iphone post data
#define d_LocalNetAddress http://XXX.XXX.XXX.XXX/a.action NSString * content = @"Test"; NSInputStream * nis = [[NSInputStream alloc] initWithData:[content dataUsingEncoding:NS原创 2009-09-15 22:55:00 · 1397 阅读 · 0 评论 -
网络代码
几个网络代码隐藏了真实的服务器IP1、采用CFHTTPMessage等复制代码 CFURLRef myWebserverURLRef = CFURLCreateWithString(kCFAllocatorDefault, CFSTR("http://192.168.0.1234"), NULL); if(myWebser转载 2009-09-15 23:08:00 · 2027 阅读 · 0 评论 -
简单实现异步下载
异步:(需要实现delegate)NSURLConnection 类:+ (NSURLConnection *)connectionWithRequest:(NSURLRequest *)request delegate:(id)delegate;delegate 方法:接收数据:- (void)connection:(NSURLConnection *)connection原创 2009-09-15 23:00:00 · 721 阅读 · 0 评论 -
NSStream来实现Socket
使用NSStream来实现Socket(写的不好的地方,请多批评~)这玩意儿已经折腾我小半年了,因为没有socket开发方面的经验,跌跌撞撞遇到了不少麻烦。以下是目前应用在我程序中的Stream类,真机真网络使用正常,3G和wifi都可以用。只是回调部分写的比较外行……应该还有更好的回调方式。以下代码除了SynthesizeSingleton.h外,都是从我自己的代码里一行一行挑出转载 2009-09-15 23:04:00 · 2224 阅读 · 1 评论 -
How To Read a File From Your Application Bundle
First you need to add your file to the Resources folder of your Xcode project. Then you can access the file like this (assuming the file is called MyFile.txt):NSString *filePath = [转载 2009-09-17 17:33:00 · 646 阅读 · 0 评论 -
openURL能帮助你运行Maps,SMS,Browser,Phone甚至其他的应用程序
openURL能帮助你运行Maps,SMS,Browser,Phone甚至其他的应用程序。这是Iphone开发中我经常需要用到的一段代码,它仅仅只有一行而已。 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://8004664411"]];这个程序通过基础的协议支持拨打电话的功能译者附: -(I转载 2009-09-17 17:37:00 · 1422 阅读 · 0 评论 -
viewForFooterInSection
http://stackoverflow.com/questions/838266/how-do-i-add-a-uibutton-or-uiswitch-in-tableviewviewforfooterinsection // Need to refactor so that the label is Public Sharing and Priviate Sharing and th转载 2009-09-24 22:39:00 · 3280 阅读 · 2 评论 -
Creating a UIImage from a CGLayer ,通过CGLayer穿件UIImage
CGLayers are great for drawing - especially when things need to be drawn over and over again. Converting a CGLayer to a UIImage is another story, though. NetSketch uses CGLayers for the drawing canv转载 2009-10-07 12:03:00 · 1003 阅读 · 0 评论 -
UIView move animation
- (void)setHoverViewMovedUp:(BOOL)movedUp { [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration:0.3]; CGRect rect = self.seqHoverView.frame; if转载 2009-10-05 11:06:00 · 879 阅读 · 0 评论