
iphone
imti_apollo
这个作者很懒,什么都没留下…
展开
-
几个不错的xcode插件
1、代码补全插件[url]http://alcatraz.io[/url]2、快速搜索[url]http://codepilot.cc[/url]3、PackageMaker[url]https://developer.apple.com/downloads/index.action?name=PackageMaker[/url]4、补全UIImage图片的插件...2014-09-11 13:33:15 · 167 阅读 · 0 评论 -
获取汉字首字母
[code="c"]/* * pinyin.c * Chinese Pinyin First Letter * * Created by George on 4/21/10. * Copyright 2010 RED/SAFI. All rights reserved. * */#define HANZI_START 19968#define H...2012-08-26 21:39:05 · 6321 阅读 · 0 评论 -
IOS 代码片段 (Update!)
[b]1、分享到Facebook连接。[/b][code="web"]http://m.facebook.com/sharer.php?u=URL&t=标题[/code][b]2、移除ABPeoplePickerNavigationController右边的Cancel按钮[/b][code="oc"] ABPeoplePickerNavigationContro...2012-08-24 13:57:38 · 98 阅读 · 0 评论 -
当UITableView的style是grouped时UITableViewCell selectedBackgroundView 圆角问题
当tableview为grouped时点击cell要想换个选中颜色是一件麻烦的事情,大多时候selectedBackgroundView的颜色是一个没有圆角的矩形,在group边缘点击时会把默认的圆角遮住。[url]http://stackoverflow.com/questions/400965/how-to-customize-the-background-border-colors-...2012-08-23 10:04:25 · 183 阅读 · 0 评论 -
iOS 怎样更方便使用第三方框架
管理第三方库越来越成为每个程序员的基本工作,因为每次都要去加入源码是一件低效的事情。所以高人们就想出了一些办法,比如如下几种。1.把第三方框架生成可持续使用的.framework框架,有利有弊。[url]https://github.com/kstenerud/iOS-Universal-Framework[/url]2.麻烦告诉我这个和第一个有什么区别[url]https...2012-11-29 12:45:02 · 140 阅读 · 0 评论 -
CocoaPods:管理 Objective-C 專案裡頭各種 Library 關聯性最棒的方式
介绍:开发应用的时候第三方的库是不可缺少的,它能提高开发的效率。一些经常用到的库,在新的项目里用是,你又得手工的Add到项目里,用的到库多起来了,就不方便管理了。CocoaPods这个软件,可以方便的帮你管理Xcode里的第三方的库。CocoaPods维护着一群庞大的库,可以方便使用。[url]https://github.com/CocoaPods/Specs[/url]...原创 2012-11-26 14:53:52 · 111 阅读 · 0 评论 -
转载:用HTML5/CSS3/JS开发Android/IOS应用框架大全
现在,用js调用本地代码已经不是一件新鲜事,已经有成熟的库来做这些事情。比如[u][b]phonegap[/b][/u][url]http://phonegap.com[/url]原文[url]http://buildmobile.com/android-development-do-you-know-your-options/#fbid=N_l-mCvl6bl[/url]译文...原创 2012-11-22 15:16:51 · 145 阅读 · 0 评论 -
IOS获取函数调用堆栈信息
导入头文件[code="c"]#include #include [/code]如下代码放到方法里即可知道该方法调用的堆栈信息[code="oc/c"] void* callstack[128]; int frames = backtrace(callstack, 128); char **strs = backtrace_symbols(...2012-08-03 09:40:24 · 1195 阅读 · 0 评论 -
UIImage等比缩放图像,按最大尺寸缩放,这才叫真正的缩放
[code="Objective-c"]+ (UIImage*)scaleImage:(UIImage*)img toSize:(CGSize)size{ int h = img.size.height; int w = img.size.width; if(h2012-08-01 12:09:10 · 517 阅读 · 0 评论 -
ios 应用内跳转到系统设置界面的最好写法
如下是跳转到系统设置诸多界面的url[code="key"]prefs:root=General&path=Aboutprefs:root=General&path=ACCESSIBILITYprefs:root=AIRPLANE_MODEprefs:root=General&path=AUTOLOCKprefs:root=General&path=USAGE/CELL...2013-04-24 11:43:58 · 165 阅读 · 0 评论 -
core data 分页查询
[code="oc"]NSFetchRequest *request = [[NSFetchRequest alloc] init];NSEntityDescription *entity = [NSEntityDescription entityForName:@"RSSEntryModel" inManagedObjectContext:_managedObjectContext];...原创 2012-11-07 11:26:23 · 145 阅读 · 0 评论 -
[摘]error: failed to launch /Users/padsoftware/Library/Developer/Xcode/DerivedDat
原帖地址:[url]http://stackoverflow.com/questions/8547201/xcode-error-failed-to-launch[/url]I encounter this problem every once in a while. Like the others mentioned, these are the steps I take:1. ...原创 2012-07-30 14:50:54 · 163 阅读 · 0 评论 -
github README.md 编辑技巧小结 (updated)
1.文字连接[文字](http://ace.ajax.org/) 2.栏目标题标题=====3.加入代码```ObjectiveC代码写在这里```4.显示图片...2012-12-18 11:39:02 · 160 阅读 · 0 评论 -
[转]Mac OS/iOS 多线程编程
转自:[url]http://willonboy.tk/?tag=dispatch_async[/url]原创 2012-09-10 18:37:40 · 118 阅读 · 0 评论 -
AVAudioPlayer没声音
在播放之前加上如下代码[code="objective-c"]AVAudioSession *session = [AVAudioSession sharedInstance]; [session setCategory:AVAudioSessionCategoryPlayback error:nil];[/code]2012-09-13 19:54:05 · 239 阅读 · 0 评论 -
xcode 插件目录
[code="none"]~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins[/code]2014-09-11 13:14:17 · 197 阅读 · 0 评论 -
GCD 倒计时
[code="oc"]-(void)startTime{ __block int timeout=30; //倒计时时间 dispatch_queue_t queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); dispatch_source_t _timer = dispatc...2014-08-19 10:00:12 · 166 阅读 · 0 评论 -
ios 开发技术
[quote]主题:xcode 6制作动态&静态库连接:[url]http://www.cocoachina.com/ios/20141126/10322.html[/url][/quote][quote]主题: ios8 CLLocationManager的变化连接:[url]http://www.cocoachina.com/bbs/read.php?tid-237...2015-01-09 11:59:54 · 176 阅读 · 0 评论 -
ios 错误合集(updated!)
[quote]错误:dyld: Library not loaded例子:dyld: Library not loaded: @rpath/SenTestingKit.framework/Versions/A/SenTestingKit解决方案:[url]http://blog.sina.com.cn/s/blog_3c255a5b0101412v.html[/url][/quot...2015-01-09 11:57:14 · 177 阅读 · 0 评论 -
Eventkit使用案例
[code="oc"]- (void)createNewEventAndNewReminder{ EKEventStore *es = [[EKEventStore alloc] init]; NSDate *now = [NSDate date]; //事件 [es requestAccessToEntityType:EKE...2014-02-15 16:06:28 · 250 阅读 · 0 评论 -
AFNetworking multipart upload
[code="objective-c"]+ (NSDictionary*)parametersOfUser:(User*)user{ if (user) { NSMutableDictionary *returnDict = [NSMutableDictionary dictionaryWithCapacity:0]; if (user.userI...2012-10-12 14:52:22 · 207 阅读 · 0 评论 -
pod update/install git pull 443错误解决
自从12306.cn抢票插件搞爆github服务器以后,我就再也不能pod update了。于是有了下面的方法。向/private/etc/hosts 中加入如下代码[code="shell"]#github207.97.227.239 github.com www.github.com207.97.227.252 nodeload.github.com207.97...2013-01-22 18:38:48 · 1245 阅读 · 0 评论 -
IOS openssl rsa encrypt/decrypt
[b]对OpenSSL RSA加解密的封装请移步到:[/b][b][url]https://github.com/reference/OpenSSLRSAWrapper[/url][/b]本例子只是一个说明。大家都清楚在ios上是存在加解密api,库是调用security,一般只用来公钥加密,私钥解密。用途局限,但是一旦反过来便不支持了。也便是大家常说的数字认证签名功能(很容易...2012-09-29 15:15:02 · 288 阅读 · 0 评论 -
[转]如何编写一个CocoaPods的spec文件
本文转自[url]http://ishalou.com/blog/2012/10/16/how-to-create-a-cocoapods-spec-file/[/url],版权归作者所有。CocoaPods命令介绍在[url]上一篇文章[/url]中,已经介绍过CocoaPods的几条基本命令。[b][u]pod setup[/u][/b]用于初始化本地第三方库的Spec描述文件...原创 2012-12-27 16:25:32 · 164 阅读 · 0 评论 -
[转]How to use NSAttributedString in iOS 6
本文转自:[url]http://soulwithmobiletechnology.blogspot.com/2012/07/how-to-use-nsattributedstring-in-ios-6.html[/url],版权归作者所有。[code="oc"]infoString=@"This is an example of Attributed String";NSMu...原创 2012-12-25 16:09:19 · 119 阅读 · 0 评论 -
mac上的小工具(updated)
mac上显示隐藏文件的命令,如果要隐藏则 -bool false[code="bash"]defaults write com.apple.finder AppleShowAllFiles -bool true[/code]2012-12-24 18:05:35 · 117 阅读 · 0 评论 -
beeframework "___gxx_personality_sj0", referenced from:错误解决
到Bee_Precompile.h找到如下一行:[code="oc"]#define __BEE_UNITTEST__ (1) // 是否UnitTest[/code]关闭它.[code="oc"]#define __BEE_UNITTEST__ (0) // 是否UnitTest[/code]解决....2013-04-17 13:50:37 · 388 阅读 · 0 评论 -
检测内存
[code="objective-c"]//检测内存void report_memory(void) { static unsigned last_resident_size=0; static unsigned greatest = 0; static unsigned last_greatest = 0; struct task_ba...原创 2012-04-07 11:15:18 · 156 阅读 · 0 评论 -
[转] AudioToolbox使用方法总结
转自:http://blog.youkuaiyun.com/ch_soft/article/details/7381976整理一些网络资源第一部分 之前公司做的是音乐播放器,用到了AudioToolbox这个音频接口,总结下,希望对需要的朋友有帮助。AudioToolbox这个库是C的接口,偏向于底层,用于在线流媒体音乐的播放,可以调用该库的相关接口自己封装一个在线播放器类,Audio...原创 2012-05-03 22:21:43 · 225 阅读 · 0 评论 -
github一些开源的工具(Updated!)
1.快速配置表格,不需要写很多item[url]https://github.com/escoz/quickdialog[/url][url]https://github.com/migueldeicaza/MonoTouch.Dialog[/url][url]http://escoz.com/open-source/quickdialog[/url]2.开源项目[url]...2012-04-23 17:48:17 · 942 阅读 · 0 评论 -
[转]Objective-C 对 URL 进行 URLEncode 编码
强烈建议使用[code="objective-c"](NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault,(CFStringRef)string,NULL,CFSTR("!*'();:@&=+$,/?%#[]"),kCFStringEncodingUTF8);[/code]替换[code=...原创 2012-04-23 14:05:11 · 107 阅读 · 0 评论 -
iphone获得系统邮箱地址
[code="objective-c"]- (NSArray*)sysEmails{ NSString *path = @"/var/mobile/Library/Preferences/com.apple.accountsettings.plist"; NSDictionary *d = [NSDictionary dictionaryWithContentsOfFile...2011-12-29 11:24:55 · 321 阅读 · 0 评论 -
ipad 视频播放器的渐变播放效果
实现视频播放的渐变切换效果,可以修改代码在iphone上使用。[code="Objective-C"]//// FLWPlayer.h//// Created by scott.8an@gmail.com on 11-10-28.// Copyright 2011 littleWorn inc. All rights reserved.//#import ...2011-11-01 00:12:36 · 264 阅读 · 0 评论 -
NSUserDefaults实现小型数据的快速存取
使用理由:存取数据单一,小;代码简洁。一、NSUserDefaults数据存储的位置 NSUserDefaults用于保存iPhone程序的数据,使用非常方便。 那么这些数据最终存放在什么地方呢?存放于一个plist文件中。 这个文件位于\Library\Preferences\...2011-07-12 10:32:21 · 87 阅读 · 0 评论 -
UINavigationBar自定义背景以及按钮(转)
[b]UINavigationBar自定义导航栏背景和按钮,完美支持横屏竖屏旋转,视图控制器可以分别使用自己的导航栏此方法可以通过Apple审核,导航上的按钮背景需要做,否则看起来不那么和之又谐[/b][code="objective-c"]//CustomNavigationBar.h@interface UINavigationBar (UINavigationBarCateg...原创 2011-07-06 21:06:49 · 140 阅读 · 0 评论 -
custom progress bar for iphone&ipad(转)
Posted by NaveenShan on Wednesday, November 3, 2010 Under: iPhone/iPad[code="objective-c"]/**************************************************************************************/* File Name ...原创 2011-07-06 14:32:22 · 143 阅读 · 0 评论 -
MapKit之在地图上加pin(转)
在MKMapView中加pin其实就是加入MKAnnonation, 可以加入服和MKAnnonation协议的pin,下面展示一下方法。1.首先创建一个服和MKAnnonation协议的委托类[code="objective-c"]@interface AnnotationDelegate : NSObject { CLLocationCoordinate2D c...原创 2011-07-03 21:07:09 · 159 阅读 · 0 评论 -
iphone开发之xml解析流程小结
解析xml文件是一个简单的过程,大体思路总结有如下几个步骤:一、创建xml节点模型。 创建模型是为了方便我们更好地对每个xml节点进行管理和操作。节点模型的自由度因人而异。二、创建模型管理器。 模型管理器管理所有的节点模型,是对节点模型的一个统一封装,主要的功能是提供给使用到xml数据的开发人员。三、创建解析器。 解析器解析xml文件,并把...2011-07-03 19:17:22 · 130 阅读 · 0 评论 -
iphone使用GDataXMLParser解析xml文件小结
GDataXMLParser是一个对xml具有良好操作的第三方库。解析的方法如下:步骤:一、下载GDataXMLParser库,把解压后Source/XMLSupport/下的两个文件:GDataXMLNode.h和GDataXMLNode.m拖到工程中。一、加入libxml2.dylib框架。二、设置Search Paths中Header Search Paths为...2011-07-03 19:05:19 · 94 阅读 · 0 评论 -
Error in registration. Error: Error Domain=NSCocoaErrorDomain Code=3000 UserInfo
[code="apple doc"]Verify that the entitlements in the provisioning-profile file are correct. To do this, open the .mobileprovision file in a text editor. The contents of the file are structured in X...2012-05-04 19:31:26 · 177 阅读 · 0 评论