06 2012 档案
关于git的submodule
摘要:http://blog.cnrainbird.com/index.php/2012/05/31/guan_yu_git_de_submodule/ 搞开发的都大都知道章鱼猫吧(github,哈哈~~)。里面有各种智慧的结晶合理利用,事半功倍。可是最近发现里面稍微复杂一些的工程都开始整submodule了。无论是直接zip下载,还是clone的,submodule都是空的,这样的运行肯定会提示缺少文... 阅读全文
posted @ 2012-06-20 18:04 easonoutlook 阅读(329) 评论(0) 推荐(0)
Mac OS Terminal 基本指令(全)
摘要:Mac OS Terminal 基本指令(全) Mac OS X 启用超级用户的方法Root user,又名超级用户,是一个权力最高的Unix 账户,Root 的账户能在整个系统里任何部份进行任何“操作”,包括:拷贝档案、移动/移除档案、执行程序等。所以,通常 Root 的账户都只会指派给高级专业的用户使用。因此,苹果把Root user 隐藏在MacOS X 里。但有时候我们不得不启用R... 阅读全文
posted @ 2012-06-20 13:38 easonoutlook 阅读(3566) 评论(0) 推荐(0)
NSURL请求中含有中文的解决方法
摘要:NSURL * nurl=[[NSURL alloc] initWithString:[urlString stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; 阅读全文
posted @ 2012-06-19 20:33 easonoutlook 阅读(213) 评论(0) 推荐(0)
UITextView底端有两行的空白区域的处理方法---重写
摘要:-(void)setContentInset:(UIEdgeInsets)s { UIEdgeInsets insets = s; if(s.bottom>8) insets.bottom = 0; insets.top = 0; [super setContentInset:insets]; } http://www.hanspinckaers.com/multi-line-ui... 阅读全文
posted @ 2012-06-12 11:24 easonoutlook 阅读(490) 评论(0) 推荐(0)
读写plist文件
摘要:写入plist文件 NSString *plistPath = @"/private/var/mobile/Media/iTunes_Control/iTunes/Ringtones.plist"; NSMutableDictionary *dictionary = [NSMutableDictionary dictionaryWithContentsOfFile:plis... 阅读全文
posted @ 2012-06-08 16:47 easonoutlook 阅读(427) 评论(0) 推荐(0)
UIscrollView通过Button来实现view的切换的方法
摘要:float coordinate =2.0f;[nodeScrollView setContentOffset:CGPointMake(460* coordinate,0) animated:YES]; http://stackoverflow.com/questions/4436745/uiscrollview-with-next-and-previous-button-action f... 阅读全文
posted @ 2012-06-06 14:12 easonoutlook 阅读(373) 评论(0) 推荐(0)
NSFileManager打印目录下的文件的函数
摘要:NSFileManager *fileManager = [NSFileManagerdefaultManager]; [fileManager contentsOfDirectoryAtPath:resourcePath error:nil] DLog(@"files is %@",[fileManager contentsOfDirectoryAtPath:resourcePath err... 阅读全文
posted @ 2012-06-06 13:01 easonoutlook 阅读(156) 评论(0) 推荐(0)
wait_fences: failed to receive reply: 10004003问题的引起原因
摘要:这个问题的实质应该是在非主线程中 直接修改 界面。 如果把alertView 发在主线程调用就ok了。==============非主线程[self performSelectorOnMainThread:@selector(onResp*****eInMainThread) withObject:nil waitUntilDone:YES];============= 主线程-(void)on... 阅读全文
posted @ 2012-06-05 17:26 easonoutlook 阅读(211) 评论(0) 推荐(0)
单例的使用总结
摘要:static RootViewController *sharedRootController = nil; +(RootViewController *) sharedController{ @synchronized(self){ if (sharedRootController == nil) { sharedRootController ... 阅读全文
posted @ 2012-06-05 17:25 easonoutlook 阅读(145) 评论(0) 推荐(0)
default.pnd for iPad 的尺寸
摘要:Filename Dimensi*****Default-Portrait.png * 768w x 1004hDefault-PortraitUpsideDown.png 768w x 1004hDefault-Landscape.png ** 1024w x 748hDefault-LandscapeLeft.png 1024w x 748hDefaul... 阅读全文
posted @ 2012-06-04 09:33 easonoutlook 阅读(156) 评论(0) 推荐(0)
UIAlertView 自动dismiss? (先设NSTimer,后调用Delegate)
摘要:- (void) performDismiss: (NSTimer *)timer { [baseAlert dismissWithClickedButtonIndex:0 animated:NO];//important [baseAlert release]; baseAlert = NULL; } - (void) presentSheet { baseA... 阅读全文
posted @ 2012-06-03 23:10 easonoutlook 阅读(220) 评论(0) 推荐(0)
自定义Notification来实现rotate
摘要:如果AViewContorller通过addSubview增加BViewController的view到界面中,当旋转iphone时,AViewController可以接到shouldAutorotateToInterfaceOrientation和- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfac... 阅读全文
posted @ 2012-06-03 23:05 easonoutlook 阅读(197) 评论(0) 推荐(0)
获取iphone当前的语言设置
摘要:NSUserDefaults* defs = [NSUserDefaults standardUserDefaults]; NSArray* languages = [defs objectForKey:@"AppleLanguages"]; NSString* preferredLang = [languages objectAtIndex:0]; 阅读全文
posted @ 2012-06-03 18:10 easonoutlook 阅读(159) 评论(0) 推荐(0)
获取UIScrollView当前所在的页面的方法
摘要:pageEnable属性 设置为YES的话后自动滚到下一页不会停在中间, 至于怎么判断当前页号 那只能根据页的frame 和 控件的 offset来判断了 CGFloat pageWidth = ImageScrollView.frame.size.width; page = floor((ImageScrollView.contentOffset.x - pageWidth / 2) ... 阅读全文
posted @ 2012-06-03 00:49 easonoutlook 阅读(1109) 评论(0) 推荐(0)
NSDate NSFormatter NSCalender 的使用
摘要:[fmt setDateFormat:@"yyyy/MM/dd hh:mm:ss:SSS"]; NSString *string=[fmt stringFromDate:nsDate]; NSDateFormatter *dateFormatter = [[[NSDateFormatteralloc] init] autorelease]; [dateFormatter setD... 阅读全文
posted @ 2012-06-01 18:24 easonoutlook 阅读(246) 评论(0) 推荐(0)
iOS 音频播放
摘要:iphone OS主要提供以下4种播放音频的方法。Sestem Sound Services、AVAudioPlayer类、Audio Queue Services、OpenAL1.Sestem Sound ServicesSestem Sound Services是最底层的也是最简单的声音播放服务,调用AudioServicesPlaySystemSound这个方法就可以播放一些简单的音频文件,... 阅读全文
posted @ 2012-06-01 16:09 easonoutlook 阅读(1388) 评论(0) 推荐(0)