2012年6月1日
摘要: iphone OS主要提供以下4种播放音频的方法。Sestem Sound Services、AVAudioPlayer类、Audio Queue Services、OpenAL1.Sestem Sound ServicesSestem Sound Services是最底层的也是最简单的声音播放服务,调用AudioServicesPlaySystemSound这个方法就可以播放一些简单的音频文件,... 阅读全文
posted @ 2012-06-01 16:09 easonoutlook 阅读(1363) 评论(0) 推荐(0) 编辑
  2012年5月29日
摘要: 本来在下载完成之后,在UIImageWriteToSavedPhotosAlbum 里面响应 image: (UIImage *) image didFinishSavingWithError: (NSError *) error contextInfo: (void *) contextInfo 这个函数,然后来更新UI的,但是操作比较繁琐,而且UI的更新总是无法同步。所以采用GCD的方式,来... 阅读全文
posted @ 2012-05-29 16:44 easonoutlook 阅读(966) 评论(0) 推荐(0) 编辑
摘要: 报错为: TTRequestLoader connection:didReceiveResponse:](354): TTDASSERT failed: 0 == _queue.maxContentLength || contentLength <=_queue.maxContentLength 解决方法: // If you hit this assertion it's because a m... 阅读全文
posted @ 2012-05-29 12:32 easonoutlook 阅读(186) 评论(0) 推荐(0) 编辑
  2012年5月28日
摘要: #import In the C language, the #include pre-compile directive always causes a file's contents to be inserted into the source at that point. Objective-C has the equivalent #import directive except ea... 阅读全文
posted @ 2012-05-28 23:41 easonoutlook 阅读(1181) 评论(0) 推荐(0) 编辑
摘要: 1、首先缓存图片,等待后面利用本地url来取 dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ TTURLCache *cache = [TTURLCache sharedCache]; for (NSDictionary *item in... 阅读全文
posted @ 2012-05-28 19:41 easonoutlook 阅读(174) 评论(0) 推荐(0) 编辑
摘要: http://www.gocalf.com/blog/iphone-dev-hide-status-bar.html 1、在info.plist里面 Status bar is initially hidden 设置为 YES 2、在appDelagate里面 设置 [application setStatusBarHidden:NO withAnimation:UIStatusBarAni... 阅读全文
posted @ 2012-05-28 11:18 easonoutlook 阅读(853) 评论(0) 推荐(0) 编辑
  2012年5月27日
摘要: 大家在新建文件的时候默认在文件的开关都会生成这样的注释: /* * * * Created by XX on 08-9-4. * Copyright 2008 __MyCompany__. All rights reserved. * */ 每次要拖动改__MyCompany__很麻烦,可以直接在命令行下输入: defaults write com.apple.xcode PBXCu... 阅读全文
posted @ 2012-05-27 23:59 easonoutlook 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 我找到获得界面语言设置的方法了: NSUserDefaults* defs = [NSUserDefaults standardUserDefaults]; NSArray* languages = [defs objectForKey:@"AppleLanguages"]; NSString* preferredLang = [languages objectAtIndex:0... 阅读全文
posted @ 2012-05-27 23:21 easonoutlook 阅读(137) 评论(0) 推荐(0) 编辑
  2012年5月25日
摘要: 最右侧加图片是以下代码, UIImageView *imgv=[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"right.png"]]; text.rightView=imgv; text.rightViewMode = UITextFieldViewModeAlways; 如果是在最左侧加图片就换成:tex... 阅读全文
posted @ 2012-05-25 10:01 easonoutlook 阅读(211) 评论(0) 推荐(0) 编辑
  2012年5月24日
摘要: textRectForBounds:Returns the drawing rectangle for the text field’s text.- (CGRect)textRectForBounds:(CGRect)boundsParametersboundsThe bounding rectangle of the receiver.Return ValueThe computed draw... 阅读全文
posted @ 2012-05-24 19:06 easonoutlook 阅读(170) 评论(0) 推荐(0) 编辑