11 2013 档案
摘要:如果要限制UITextField输入长度最长不超过kMaxLength,那么需要实现做以下操作:1、实现UITextFieldDelegate协议;2、实现textField:shouldChangeCharactersInRange:replacementString:方法;- (BOOL)textField:(UITextField*)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString*)string{NSIntegerstrLength = textField.text.le
阅读全文
摘要://修改搜索框背景 self.searchCarKeyWord.backgroundColor=[UIColorclearColor]; //去掉搜索框背景 //1. [[self.searchCarKeyWord.subviewsobjectAtIndex:0]removeFromSuperview]; //2. //CGRect rcSearchBg = CGRectMake(0, 0, self.searchBar.frame.size.width, self.searchBar.frame.size.height); UITextField *searchField; UIButton
阅读全文
摘要:#!/bin/sh`rm -rf allLua.zip``mkdir ./tempScripts``mkdir ./tempScripts/scripts``cp -a ./scripts/ ./tempScripts/scripts`echo "拷贝中间文件"`find ./tempScripts -name .svn|xargs rm -rf`echo "删除svn"filelist=`find ./tempScripts/scripts -name "*.lua"`echo "生成luac"for file
阅读全文
摘要:Permission denied, please try again.Permission denied, please try again.Permission denied (publickey,password).Failed to create directory /var/root/iOSOpenDevBuilds/HelloDev on device 192.168.1.10-----------1.改目录权限chmod 600 ~/.ssh/authorized_keyschmod 700 ~/.sshchmod 700 ~2.修改iphone etc/ssh/sshd_con
阅读全文
摘要:转自:http://www.eoeandroid.com/thread-251598-1-1.html好像有很多朋友都碰到过这个问题,即在真机调试时,按hone键返回桌面,再回到app时,app会crash或僵死。同时xcode停留在:libGPUSupportMercury.dylib`gpus_ReturnNotPermittedKillClient:0x372fa094: trap0x372fa096: nop原因在于AppDelegate.cpp里:void AppDelegate::applicationDidEnterBackground(){ CCDirector::sha...
阅读全文
摘要:使用sips批量缩放图片大小>>sips -s format jpeg -Z 250 someImage.PNG --out myImage.JPEG把someImage.PNG转换为最长边为250的myImage.JPEG。//什么叫最长边,比如我有张图它的比例是750*460,那么如果我用大Z的话,转出来的结果应该是250 * 153 (460 * (250/750)),这就是最大边。 但如果我想硬改为250 * 250 呢?命令如下:>>sips -s format jpeg -z 250 250 someImage.PNG --out myImage.JPEGs
阅读全文
摘要:1.AppIcon:可以瞬间把图片转换为应用所需要的Icon(Icon-72.png,Icon-72@2x.png,......iTunesArtwork@2x)2.Resizer:方便把-hd,@2x之类的图片压缩,特别适合配合cocos2d使用3.Dash查看各种语言和API的参考文档,C,C++,OBJ-C,cocos2d,cocos2d-x,cocos3d,python,ruby,javascript,qt...你想得到的基本上都有4.SourceTree(Git/Hg)配合git使用的图形界面软件,远离命令行5. Sound Forge Pro简单的处理音效,很方便6.Particl
阅读全文
摘要:It seems to be possible in iOS 5 using the UIAppearance proxy.[[UILabel appearance] setFont:[UIFont fontWithName:@"YourFontName" size:17.0]];That will set the font to be whatever your custom font is for all UILabels in your app. You'll need to repeat it for each control (UIButton, UILa
阅读全文