`
文章列表
http://www.xuanyusong.com/archives/1493        一篇很好的文章讲本地相册和相机调用
我们编写app程序的时候经常需要播放一些声音效果   但是这些声音在播放第一次的时候会造成程序卡顿, 因为在初始化, 从而引起不好的用户体验   可以用 [theAudio prepareToPlay];   来初始化音乐的播放,这样就能避免第一次播放时程序的卡顿了   NSString *path = [[NSBundle mainBundle] pathForResource:@"bubble-pop" ofType:@"mp3"]; theAudio = [[AVAudioPlayer alloc] initWithConte ...
You'll need to add an UITapGestureRecogniser and assign it to the view, and then call resign first responder on the textfield on it's selector. The code: In viewDidLoad UITapGestureRecognizer*tap =[[UITapGestureRecognizer alloc] initWithTarget
使用cocospods的时候   挂上了vpn   打了 pod install    一直停留在   Analyzing dependencies   可以试试   pod install --no-repo-update   一下子就全部下好了 还不知道什么原理
使用ios时间的时候 不同地区会显示不同格式的时间 比如在中国会显示 9月 2014 而在美国就显示 Sep 2014这点怎么做到呢 ios提供了一个api   - (NSString*)getPreferredLanguage { NSUserDefaults* defs = [NSUserDefaults standardUserDefaults]; NSArray* languages = [defs objectForKey:@"AppleLanguages"]; NSString* preferredLang = [langua ...

preferredStatusBarStyle

    博客分类:
  • ios
当一个view的背景被你设置成黑色的时候,上面的事件会看不见,ios7中有一个简单的方法解决这个问题,就是给view加一个方法   - (UIStatusBarStyle)preferredStatusBarStyle { return UIStatusBarStyleLightContent; }   这样就行了,上面的时间 电池容量等信息就会是白色的

IOS学习笔记

    博客分类:
  • ios
day1 2013.10.14   IBOutlet 加上后实现类里的 变量和方法 可以与xib文件里的控件链接   -(IBAction) keyboardDismiss:(id)sender { [sender resignFirstResponder]; } 让键盘消失     - (void)viewDidLoad { [body_height setKeyboardType:UIKeyboardTypeNumbersAndPunctuation]; [body_weight setKeyboardType:UIKeyboardTy ...
多字段排序的问题其实很简单,只要实现一个自己的Comparator就可以。  例如我有一个类class Student {  public String name;  public int id;  public char gender;  public Student(String name, int id, char gender){     this.name = name;     this.id = id;     this.gender = gender;  }
[转]http://galabov.com/index.php/blog/eclipse-slow-responding-while-refreshing-external-folders/ Eclipse slow responding while refreshing external folders.   For some time i'm observing a very slow eclipse responding on every single SVN-Update. A simple check out takes approximately 10 ...
  转自:http://blog.csdn.net/buyaore_wo/article/details/6878991   直接给例子吧!例子中将讲解 1.权限表示 2.权限判断 3.添加权限 4.取消权限public class Test { /** * @param args */ public static void main(String[] args) { /** * 四种权限 ,当前定义为int,以下二进制表示只取后四位作说明 */ // 添加 int c = 1;// ...0001 // 查询 ...

ios技术面试题

    博客分类:
  • ios
1.Difference between shallow copy and deep copy? 浅复制 只拷贝地址 不拷贝地址指向的对象 深复制 拷贝地址 并且指向拷贝的新对象2.What is advantage of categories? What is difference between implementing a category and inheritance?   categories: 在不影响或修改原来的类别或模组的情况下去修改原有的功能,增加新的功能3.Difference between categories and extensions?   categ ...
http://blog.sina.com.cn/carol   http://blog.eddie.com.tw/   http://blog.eddie.com.tw/2010/11/23/iphone-app-in-action/  
在cocos2d 0.9版本中,存在CCBitmapFontAtlas类,但是在2.0中却找不到这个类了,通过xcode创建的cocos2d工程后,如果你安装0.9版本的方式使用CCBitmapFontAtlas,将会报错,因为在2.0中已经将CCBitmapFontAtlas替换成了CCLabelBMFont,其使用方法如下: CCLabelBMFont *label = [CCLabelBMFont labelWithString:@"Go back" fntFile:@"font01.fnt"];若其他版本中也出现此类错误,不妨也将CCBitmapF ...
 转自 http://blog.csdn.net/a600423444/article/details/6658411   MyBatis动态SQL   动态SQLMyBatis的动态SQL,解决了SQL字符串拼接的痛苦。   1.if     <select id="findActiveBlogWithTitleLike" parameterType="Blog" resultType="Blog"> SELECT * FROM BLOG WHERE state = 'ACTIVE' &l ...
http://www.cn-java.com/www1/?action-viewnews-itemid-102789   http://tech.ccidnet.com/art/3539/20060516/553669_1.html   http://redleaf.iteye.com/blog/78217   http://www.blogjava.net/action/archive/2006/04/24/42822.html   http://coolshell.cn/articles/4261.html   http://www.oracle.com/technetw ...
Global site tag (gtag.js) - Google Analytics