
iphone
文章平均质量分 64
speedboy007
我们是一个充满活力激情的团队,拥有5年以上的移动互联网开发经验,专注于移动手机开发iOS,Android开发和产品设计,帮助客户设计UI,UE和开发产品,高质量的代码和文档,优秀的UI设计和体验
展开
-
NewsStand书架效果(精选)
尊重别人的劳动成果,抵制只下载不评论。源码下载地址: http://blog.sina.com.cn/s/blog_7bf10deb01010iij.html原创 2011-12-01 13:44:17 · 671 阅读 · 0 评论 -
UIGestureRecognizer同时识别两个手势
UIGestureRecognizerDelegate里面有一个委托方法:- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecogn原创 2012-09-06 09:45:33 · 6066 阅读 · 0 评论 -
Improved logging in Objective-C
Improved logging in Objective-CImproved logging in Objective-CQ: How can I add context information - such as the current method or line number - to my logging statements?A: The C preprocess翻译 2012-09-08 12:15:39 · 740 阅读 · 0 评论 -
iPhone Core Graphics 和 Quartz的关系
quartz属于core graphic framework的一部分.为什么都说quartz的坐标系都在左下角呢?因为那是在mac x os里面,如果在iPhone OS中,坐标系是左上角的. Note: If you are using Quartz 2D for an iPhone application, make sure you understa转载 2012-09-10 11:24:16 · 1742 阅读 · 0 评论 -
UIImage 混合给定的颜色
- (UIImage *)imageTintedWithColor:(UIColor *)color{// This method is designed for use with template images, i.e. solid-coloured mask-like images.return [selfimageTintedWithColor:colorfractio原创 2012-09-10 13:38:41 · 1010 阅读 · 0 评论 -
UIImage+Alpha
// UIImage+Alpha.h// Created by Trevor Harmon on 9/20/09.// Free for personal or commercial use, with or without modification.// No warranty is expressed or implied.// Helper methods for a翻译 2012-09-10 13:42:33 · 1963 阅读 · 0 评论 -
iphone 二维数组摘要
UIImageView *presentedImageViewArray[4][4];//创建一个4x4的二维UIImageView数组 int aBlockWidth =DisplayQRCodeViewWidth/BlockNumber; int aBlockHeight =DisplayQRCodeViewHeight/BlockNumber;原创 2012-09-10 16:29:29 · 596 阅读 · 0 评论 -
Quartz Transforms CTM, 转换矩阵
Quartz转换实现的原理:Quartz把绘图分成两个部分, 用户空间,即和设备无关, 设备空间,用户空间和设备空间中间存在一个转换矩阵 : CTM本章实质是讲解CTMQuartz提供的3大功能移动,旋转,缩放演示如下,首先加载一张图片void CGContextDrawImage ( CGContextRef转载 2012-09-10 11:33:25 · 535 阅读 · 0 评论 -
iPhone剪切技巧
iPhone中的剪切技巧: 1.获取图形上下文 2.构造剪切的路径(形状)3.构建剪切区域 4.贴上你的画 // 1 CGContextRef context = UIGraphicsGetCurrentContext(); // 2 CGRect bounds = CGRectMake(0.0f, 0.0f, SI转载 2012-09-10 11:25:37 · 609 阅读 · 0 评论 -
UIImage+Resize
// UIImage+Resize.h// Created by Trevor Harmon on 8/5/09.// Free for personal or commercial use, with or without modification.// No warranty is expressed or implied.// Extends the UIImage翻译 2012-09-10 13:43:22 · 3084 阅读 · 0 评论 -
UIImage+RoundedCorner
// UIImage+RoundedCorner.h// Created by Trevor Harmon on 9/20/09.// Free for personal or commercial use, with or without modification.// No warranty is expressed or implied.// Extends the翻译 2012-09-10 13:48:56 · 1025 阅读 · 0 评论 -
UIImage+Dsp
//// UIImage+Dsp.m//// Created by Andrew from Mad Dog Software (http://www.mad-dog-software.com) on 18/05/11.// // Use this however you want for whatever you want but no warranty is impl翻译 2012-09-10 14:12:52 · 1112 阅读 · 0 评论 -
iphone 如何清空UIWebView的缓存
I actually think it may retain cached information when you close out the UIWebView. I've tried removing a UIWebView from my UIViewController, releasing it, then creating a new one. The new one remembe原创 2012-09-27 18:04:12 · 12765 阅读 · 0 评论 -
如何在retina显示屏中截屏适应你的VIew
CGFloat scale = 1.0;if([[UIScreen mainScreen]respondsToSelector:@selector(scale)]) { CGFloat tmp = [[UIScreen mainScreen]scale]; if (tmp > 1.5) { scale = 2.0; }} if翻译 2012-09-11 17:13:03 · 1771 阅读 · 0 评论 -
iPhone图形开发绘图小结
iPhone图形开发绘图教程是本文要介绍的内容,介绍了很多关于绘图类的使用,先来看详细内容讲解。1、绘图总结:绘图前设置:CGContextSetRGBFillColor/CGContextSetFillColorWithColor //填充色 CGContextSetRGBStrokeColor/CGContextSetStrokeColorWithColor //转载 2012-09-12 09:19:12 · 472 阅读 · 0 评论 -
iPhone中如何获取当前输入法
如题,在iPhone开发中,我们如何获取当前的输入法呢?使用:[[UITextInputMode currentInputMode] primaryLanguage]如果是“en-US”那么就是英文状态输入法如果是“zh-Hans”那么就是中文输入法了转载 2012-09-12 09:20:44 · 736 阅读 · 0 评论 -
粒子发射系统中的CAEmitterLayer
简介:CAEmitterLayer提供了一个基于Core Animation的粒子发射系统,粒子用CAEmitterCell来初始化。 粒子画在背景层盒边界上。但是CAEmitterLayer只支持IOS5及以上版本。 Properties: birthRate:粒子产生系数,默认1.0; emitterCells: 装着CAEmitt转载 2012-09-12 09:26:17 · 717 阅读 · 0 评论 -
NSArray的排序功能sortedArrayUsingSelector
- (NSArray *)sortedArrayUsingSelector:(SEL)comparatorParameterscomparatorA selector that identifies the method to use to compare two elements at a time. The method should returnNSOrderedAsce转载 2012-09-12 09:31:49 · 10489 阅读 · 0 评论 -
Iphone cover flow 开源实现
tapkulibrary-CloverFlowhttp://wiki.github.com/devinross/tapkulibrary/coverflow不仅仅是coverflow效果,很高内容的库 OpenFlowhttp://apparentlogic.com/openflow/git 地址 http://github.com/thef翻译 2012-09-12 09:32:52 · 586 阅读 · 0 评论 -
iphone中用static的问题
项目中有时需要一些全局变量存储应用程序运行过程中的一直存在的信息,翻看了一些资料,决定使用Apple官方文档推荐的Signaleton模式,使用过程很顺利,但是随之而来的是关于内存管理的考虑,官方文档的示例代码如下: static MyGizmoClass *sharedGizmoManager = nil; + (MyGizmoClass*)sharedManag转载 2012-09-12 09:49:15 · 472 阅读 · 0 评论 -
iphone自定义UINavigationBar背景的问题
在IOS4中,可以通过自定义UINavigationBar的drawRect方法,而且这种方式还不错,只要引入这个文件,就生效。 代码如下:C代码 @implementation UINavigationBar(UINavigationBarCategory) #pragma mark - #pragma mark 重载转载 2012-09-12 09:55:30 · 499 阅读 · 0 评论 -
苹果App Store申请和管理相关知识
苹果app store申请转载:http://wsqwsq000.iteye.com/blog/1409913app store为开发者提供四种类型的申请: 个人ios开发者计划$99/年公司ios开发者计划$99/年企业ios开发者计划$299/年高校ios开发者计划免费在这里主要介绍一下公司ios开发者计划,只有利用个人和公司ios开发者计划证书开发的应用,才能转载 2012-09-12 09:57:32 · 1682 阅读 · 0 评论 -
iphone中xcode4.2中取消arc
sdk5的xcode自带了arc,虽然arc是比gc强大很多,但由于开发的习惯性,还有框架不适应,在arc还没足够稳定和安全以前,暂时还是使用手动alloc和release等。 至于如果取消arc,分3步: 1、project -> Build settings -> Apple LLVM complier 3.0 - Language -> objective-C转载 2012-09-12 10:05:41 · 673 阅读 · 0 评论 -
iphone中使用Xcode创建自己的静态链接库
本文章将介绍如何使用Xcode创建自己的静态链接库静态链接库适用于:1.你想将一部分以后都不会修改的代码打包,供其他项目使用2.你想将一部分代码封装起来给别人用,又不愿别人看到你的实现方法如何制作静态链接库(以下简称lib):1。如果是新工程。创建工程的时候选Framework&Library -> cocoa touch static library,就直原创 2012-09-12 10:06:53 · 1229 阅读 · 0 评论 -
ipohone开发测试工具FoneMonkey
FoneMonkey一老外弄的iphone平台上的录制回放测试工具,在它的网站上有很详细的使用说明及环境搭建。网站地址为:http://www.gorillalogic.com/books/fonemonkey。这里只简单的总结下自己在使用中的步骤及有可能遇到的问题。一、环境搭建(Xcode4)1、下载FoneMonkey,解压2、打开要测试的工程,在targets中建一新转载 2012-09-12 10:09:28 · 2591 阅读 · 0 评论 -
iphone推送apns学习
标注:APNs 苹果推送服务器Device 安装带有推送服务程序的iPhone手机Provider 程序服务器,把需要推送的信息发给 APNsDeviceToken 在Device第一次连接APNs时,由APNs生成的经过加密的连接认证信息。在以后的连接中,无论时Provider到APNs还是APNs到Device 都需要 DeviceToken作为认证。Payload 需要推转载 2012-09-12 10:11:34 · 718 阅读 · 0 评论 -
iPhone利用apns进行Push消息推送
iPhone Push Notification 消息推送 图文详细介绍是本文要介绍的内容,首先声明下写这个文章的目的,就是让更多人更好的了解push notificaiton 苹果的消息推送功能。(虽然网上有很多类似的文章说明,但是当自己实践起来的时候还是觉得花费了不少的时间)在文章之前先提及以下几个概念对照如上图我们介绍文章后面的一些概念1、Provider:转载 2012-09-12 10:13:35 · 849 阅读 · 0 评论 -
自定义UITabBarController的tabBar背景图片
新建一个类继承UITabBarController: - (id) init{ self = [super init]; if (self) { //方法一 UIImageView *img = [[UIImageView alloc] initWithImage:[UIImage imageN原创 2012-09-12 10:16:32 · 536 阅读 · 0 评论 -
iphone中libiconv库的作用
iphone中libiconv库的作用 主要原因是:iPhone上读取ansi字符串的需要 由于iPhone的NSString并不支持ansi的字符串(比如咱们常用的gb2312), 因此如果要读取的话, 需要转换为UTF-8的 而iPhone上自带了libiconv库, 于是这个转换变的就比较简单了原创 2012-09-12 10:19:30 · 1124 阅读 · 0 评论 -
Info.plist中常用的key简介
UIRequiresPersistentWiFi 在程序中弹出wifi选择的key(系统设置中需要将wifi提示打开)UIAppFonts 内嵌字体(http://www.minroad.com/?p=412 有详细介绍)UIApplicationExitsOnSuspend 程序是否在后台运行,自己在进入后台的时候exit(0)是很傻的办法UIBackgroundModes 后台运行转载 2012-09-12 10:23:50 · 512 阅读 · 0 评论 -
iphone开发中发送e-mail的3种方式
iOS系统框架提供的两种发送Email的方法 1、使用openURL来实现发邮件的功能:NSString *url = [NSString stringWithString: @"mailto:foo@example.com?cc=bar@example.com&subject=Greetings%20from%20Cupertino!&body转载 2012-09-12 10:27:36 · 1748 阅读 · 0 评论 -
iphone开发——检查网络状态
iPhone SDK中附带了 SCNetworkReachabilityCreateWithAddress用于检查ip地址是否可以访问。传入清零地址(0.0.0.0)可用来查询网络状态。网络可使用时返回YES,否则为NO。返回标记:kSCNetworkReachabilityFlagsIsWWAN :测试用户使用的时运营商的网络还是本地wifi。kSCNetw转载 2012-09-12 10:30:01 · 611 阅读 · 0 评论 -
开源语音格式speex教程
本文由社区会员cxjwin分享这两天在折腾语音的东西,实现类似微信上对讲机的功能,做了两个Demo,一种使用lib-amr库用amr格式实现的,这个网上有现成的教程,所以还是比较好实现的。另一个是用的speex库,这个提的人很多,但是出教程的不多,恨透那个爱图腾的教程了,很多不明所以的地方,让我们这些新手很困惑呀,网上晃了3天终于可以搞出个像样的Demo了。Demo中我将一个录好的.caf转载 2012-09-28 22:37:40 · 1121 阅读 · 0 评论 -
NSValue包装对象指针,CGRect结构体等
[cpp] view plaincopy@interface NSValue (NSValueUIGeometryExtensions) + (NSValue *)valueWithPointer:(const void *)pointer;//保存对象指针 + (NSValue *)valueWithCGPoint:(CGPoint转载 2012-09-28 23:20:19 · 987 阅读 · 0 评论 -
自定义UITableViewCell 的选中背景图片
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellIdentifier];原创 2012-10-09 10:58:02 · 2640 阅读 · 0 评论 -
UILabel光晕Demo
@synthesize redValue;@synthesize greenValue;@synthesize blueValue;-(id) initWithFrame: (CGRect)frame { if ((self = [super initWithFrame:frame])) { redValue = 0; // Defaul转载 2012-09-17 16:07:03 · 512 阅读 · 0 评论 -
如何去掉app icon上的玻璃效果
First Settings in a your project info-list set key Icon already inculdes gloss effects to YES Boolean value like below screen shot:首先在plist文件里添加一个属性Icon already inculdes gloss effects,然后设置为YES翻译 2012-10-08 15:51:57 · 1168 阅读 · 0 评论 -
XCode开发技巧之UserScripts使用
XCode作为一款强大的IDE,当然也支持脚本功能。通过添加自己的脚本我们可以很方便的完成我们的工作。在XCode中点击 Edit User Scripts即可方便的添加脚本,而且XCode自带的脚本也相当于给我们提供了丰富的样例。比如我们添加一个这样的脚本,并为其添加一个快捷键??P(快捷键添加方法参考Comments分类中的Un/Comment Selection脚本)1.转载 2012-10-10 14:56:26 · 1137 阅读 · 0 评论 -
判断 iOS 系统版本
/* * System Versioning Preprocessor Macros */ #define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)#原创 2012-10-10 11:10:21 · 2180 阅读 · 0 评论 -
iOS and iPhone Handling unhandled exceptions and signals
原文地址:http://cocoawithlove.com/2010/05/handling-unhandled-exceptions-and.html由于原文被盾了,我把它转载到这里供大家访问When an application crashes on the iPhone, it disappears without telling the user what happened转载 2012-09-14 09:46:14 · 1147 阅读 · 0 评论