lee409吧
关注: 5 贴子: 99

  • 目录:
  • 个人贴吧
  • 0
    经核实吧主lee409 未通过普通吧主考核。违反《百度贴吧吧主制度》第八章规定http://tieba.baidu.com/tb/system.html#cnt08 ,无法在建设 lee409吧 内容上、言论导向上发挥应有的模范带头作用。故撤销其吧主管理权限。百度贴吧管理组
  • 2
    1、有时候在展示UITableView的时候,表格的count为3,底部会呈现多余的cell,即使时没有数据 2、解决方法,修改footview - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section { UIView *v = [[[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 65)] autorelease]; v.backgroundColor = [UIColor clearColor]; return v; }
  • 1
    1、图片处理脚本 2、安装python cd /Users/apple/Downloads/Python-2.6.4 ./configure make 3、安装图片处理库 cd /Users/apple/Downloads/Imaging-1.1.7 sudo python setup.py build python setup.py install 4、运行python脚本
    lee409 6-16
  • 0
    [self.navigationController popToViewController:[self.navigationController.viewControllers objectAtIndex:[self.navigationController.viewControllers count]-2] animated:YES];==[self.navigationController popViewControllerAnimated:YES];
    lee409 3-7
  • 0
    // open sina weibo app UIDevice *device = [UIDevice currentDevice]; if ([device respondsToSelector:@selector (isMultitaskingSupported)] && [device isMultitaskingSupported]) { NSDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys: self.appKey, @"client_id" , self.appRedirectURI, @"redirect_uri" , self.ssoCallbackScheme, @"callback_uri" , nil]; BOOL SinaWeiboIsDeviceIPad() { #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 30200 if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) { return YES; } #endif return NO; } // 先用iPad微博打开 NSString *appAuthBaseURL = @
    lee409 3-7
  • 0
    http://manuals.info.apple.com/zh_CN/Enterprise_Deployment_Guide_
    lee409 3-7
  • 3
    1、phonegap的要求 xcode4.3+ ;xcode command line tools(Xcode Command Line Tools (Xcode Preferences -> Downloads -> Components -> Command Line Tools -> Install);Mac OS X Lion or greater (10.7+);download Apache Cordova(http://phonegap.com/download) 2、安装phonegap 在down的/Users/apple/Documents/WorkPlace/phonegap/phonegap-phonegap-2dbbdab/lib/ios下找到cordova-2.0.0.dm**击安装,安装完成后可以在/Users/apple/Documents目录下看到cordovaLib工程项目(ps:新建的phonegap项目都会引用此项目工程) 3、新建phonegap项目 打开终
    lee409 1-24
  • 5
    (挖坑)
    lee409 12-10
  • 0
    http://www.cnblogs.com/syncg/archive/2012/08/11/2633957.html http://blog.sina.com.cn/s/blog_71715bf801016d38.html
    lee409 12-6
  • 0
    在ios4.3版本以下,lldb跟gdb,lldb不支持中文,所以在UITextField中,输入字母,选择中文,不会触发UIControlEventEditingChanged,真机调试时,所有带中文的Log都无法输出,改gdb就触发 在4.3版本以上,lldb已经能进入 但是有些情况并不是这样,待研究
    lee409 12-6
  • 0
    lee409 2012-12
    Icon配置 Device/Screen File Name (PNG) Icon Size (pixels) iPhone and iPod Application Icon for iPhone (retina display) Icon@2x.png 114 x 114 Application Icon icon for iPhone Icon.png 57 x 57 Settings/Spotlight icon for iPhone (retina display) Icon-Small@2x.png 58 x 58 Settings/Spotlight icon for iPhone Icon-Small.png 29 x 29 Launch image Portrait (retina display) Default@2x.png 640 x 960 Launch image Portrait Default.png 320 x 480 iPad Application Icon for the new iPad (retina display) Icon-72@2x.png 144 x 144 Application Icon for the iPad Icon-72.png 72 x 72
    lee409 12-4
  • 0
    A调用B程序 1、在A程序中按钮点击地方调用 NSURL * myURL_APP_A = [NSURL URLWithString:@"testPro2://AAAAA"]; if ([[UIApplication sharedApplication] canOpenURL:myURL_APP_A]) { NSLog(@"canOpenURL"); [[UIApplication sharedApplication] openURL:myURL_APP_A]; } 2、在B程序中plist中注册响应url
    lee409 12-3
  • 1
    1、首先建立一个静态库工程,命名为MyCocoaLib 2、添加必要的方法 3、修改MyCocoaLib.h,在 Target Membership 中选中 MyCocoaLib,并将属性修改为 Public 4、在 MyCocoaLib的工程属性中,选择 Targets - MyCocoaLib- Build Settings 然后选中“Public Headers Folder Path”将属性修改为:“$(TARGET_NAME)”,如下图所示: 5、分别在scheme中 Destination中选 iphone 5.1 simulator和 ios device 分别编译 6、至此就生成了两个.a库,debug版本的simulator和device的库。Ps:如果发布则要选择release版本,为了方便可
    lee409 11-30
  • 0
    cookie和session机制之间的区别与联系 具体来说cookie机制采用的是在客户端保持状态的方案。它是在用户端的会话状态的存贮机制,他需要用户打开客户端的cookie支持。cookie的作用就是为了解决HTTP协议无状态的缺陷所作的努力. 而session机制采用的是一种在客户端与服务器之间保持状态的解决方案。同时我们也看到,由于采用服务器端保持状态的方案在客户端也需要保存一个标识,所以session机制可能需要借助于cookie机制来达到保存标识的目的。而session提
    lee409 10-25
  • 0
    chflags nohidden /Users/用户名/Library 此外 很多用户发现Xcode 4中找不到Build目录以及编译出来的应用文件了,其实是Xcode 4做了修改,你可以在以下目录找到对应程序的文件 /Users/用户名/Library/Developer/Xcode/DerivedData/产品名称-fylcrwghjxojxcgaejhixgwinhus/Build/Products/
    lee409 8-26
  • 1
    lee409 2012-08
    大姐--冬月初二,二姐——六月初三,爸——腊月十八
    lee409 8-12
  • 1
    //在group模式下 cell下面显示一段文字 - (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section { if(section==0) { UIView *viewBg=[[[UIView alloc] init] autorelease]; viewBg.backgroundColor=[UIColor clearColor]; UILabel *labelGroupName = [[UILabel alloc] initWithFrame:CGRectMake(20, -10, 280,50)]; labelGroupName.font = [UIFont systemFontOfSize:12]; labelGroupName.tag=101; labelGroupName.textColor = [UIColor blackColor]; labelGroupName.backgroundColor = [UIColor clearColor]; labelGroupName.highlightedTextColor = TTSTYLEVAR(highlightedTextColor); labelGr
  • 0
    今天问水月的问题 NSDateFormatter *inputFormatter = [[NSDateFormatter alloc] init]; [inputFormatter setDateFormat:@"yyyy-MM-dd"]; inputFormatter.locale = [[[NSLocale alloc] initWithLocaleIdentifier:@"zh-CN"] autorelease]; NSDate *formatterDate = [inputFormatter dateFromString:[NSString stringWithFormat:@"%d-%d-%d",item.gdate.year, item.gdate.month, item.gdate.day]];//@"1999-07-11"]; NSDateFormatter *outputFormatter = [[NSDateFormatter alloc] init]; [outputFormatter setDateFormat:@"EEEE"]; NSString *newDateString = [outputFormatter stringFromDate:formatterDate];
    lee409 7-20
  • 0
    项目中遇到iphone3 装不了程序问题。需要分析是不是iphone3还是iphone3gs 如果要支持iphone3,则需要加入armv6 apple 通用二进制应用程序,含多种处理器或架构的二进制,如x86或x64,arm11或a8 armv7与armv6是指指令或架构的CPU, armv6是iphone3gs以前arm11 cpu使用的指令集 armv7是iphone3gs及以后、iphone4、ipad,cortex a8 cpu使用的指令集 What is ARMv7? It's a new CPU architecture of iPhone. Make some apps run faster. What does ARMv7 to do with me? Here is a post by most_Unique found on iPhoneCake. Most apps today use FAT b
    lee409 7-20
  • 0
    配置svn的步骤 1、打开xcode organizer 添加一个svn地址 2、填写账号密码 3、默认不填 4、一般到了这步会有个问题unable to load revisions 解决方法是打开终端,输入:svn ls svn://svnserver:/apps/wei/iPhone/trunk, 如果不行svn ls https://svnserver:/apps/wei/iPhone/trunk
    lee409 7-20
  • 0
    项目中经常会遇到别人写的web,wap,然后嵌套进客户端里面,一般UIWebView来加载网页,但是存在交互问题。1、当点击web的按钮触发事件,客户端怎么相应。2、当点击客户端的按钮,web怎么相应 解答1、以下为网上内容,转 首先弄一个html。 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type"content="text/html; charset=utf-8" /> <title>test U
    lee409 7-11
  • 1
    让你的程序看起来更出彩,iphone的动画效果摘录了几个分享如下 1.淡入淡出的效果 淡入 CATransition *animation = [CATransition animation]; [animation setDuration:1.25f]; [animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]]; [animation setType:kCATransitionReveal]; [animation setSubtype: kCATransitionFromBottom]; [self.layer addAnimation:animation forKey:@"Reveal"]; 淡出 CATransition *animation = [CATransition animation]; [animation setDuration:1.25f]; [animation setTimingFunction:[CAMediaTimingFunction functionWithNa
    solider12 7-11
  • 1
    (挖坑) 1、ego 2、three20 3、网友代码
    lee409 7-11
  • 0
    在项目中有时需要让一段文字显示几种颜色 如果用系统的UILabel达不到这样的效果,three20正好给出这个解决方案 首先定义一个TextStyleSheet 类继承TTDefaultStyleSheet @interface TextStyleSheet : TTDefaultStyleSheet @end @implementation TextStyleSheet ///////////////////////////////////////////////////////////////////////// //分别给出两种颜色 - (TTStyle*)ColorText1 { return [TTTextStyle styleWithFont:[UIFont systemFontOfSize:15] color:HEXCOLOR(0x606F83) next:nil]; } - (TTStyle*)ColorText2 { return [TTTextStyle styleWithFont:[UIFont systemFontOf
    lee409 7-6
  • 1
    自定义键盘,通俗作法是自己用UIView上面加一些button,每一个button就是一个按键 (先挖坑,代码后续)
    lee409 7-5
  • 3
    通讯录读取的时候,会遇到头像大图片(一般会手机拍照作为头像,像素很大2k*2k)的时候,放在列表上会卡,必须在拿的时候处理成小图 CFDataRef imageData = ABPersonCopyImageData(record);//获取图片的Data CFDataRef imageData = ABPersonCopyImageDataWithFormat(record,kABPersonImageFormatThumbnail);//获取图片的缩略图默认为320*320,ps还是会卡,最好的情况是第一次的时候读取该数据,并生成一张小图(64*64)存放沙盒,以后就直接读沙盒的小图 // Images typedef enum { kABPersonImageFormatThumbnail = 0, //
    lee409 7-5
  • 1
    NSFileManager *fileManager = [[NSFileManager alloc] init]; NSString *pathDocuments=[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; NSString *createPath=[NSString stringWithFormat:@"%@/Image",pathDocuments]; NSString *createMessageQueuePath=[NSString stringWithFormat:@"%@/MessageQueueImage",pathDocuments]; if (![[NSFileManager defaultManager] fileExistsAtPath:createPath]) { [fileManager createDirectoryAtPath:createPath withIntermediateDirectories:YES attributes:nil error:nil]; [fileManager createDirectoryAtPath:createMessageQueuePath withInterm
    solider12 7-4
  • 0
  • 0
    很多时候我们需要在tableView的每一个cell中布置数据 我们拿来原始数据的时候会习惯性的在下列函数中做解析,少量数据的时候,性能还好 一遇到大量数据的时候,就会造成滑动的时候页面卡死 所以正确的作法是,你先解析数据成NSMutableArray -(void)getData { xxxx self.sectionHeightArray xxx } - (UITableViewCell *)tableView:(UITableView *)aTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSString *groupName= [[[self.sectionHeightArray objectAtIndex:indexPath.section] objectAtIndex:indexPath.row] objectForKe
    lee409 7-4
  • 2
    经常会遇到需要在沙盒中创建一个plist功能 首先判断沙盒中是否有plist,如果没有则将bundlefile中的plist空文件copy一个去,后面会提供一个直接新建一个plist的方法 // NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES); NSString *uniquePath=[[paths objectAtIndex:0] stringByAppendingPathComponent:@"test.plist"]; //判断此plist是否存在 BOOL blHave=[[NSFileManager defaultManager] fileExistsAtPath:uniquePath]; if (!blHave) { NSString *newFile = [[NSBundle mainBundle] pathForResource:@"test.plist" ofT
    lee409 7-4
  • 0
    //增加一个获取图片文件夹zip请求 -(void)getImageZip { NSString *path = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]; downloadPath = [[NSHomeDirectory() stringByAppendingPathComponent:@"Documents/HeadImage.zip"] retain]; NSString *tempPath = [path stringByAppendingPathComponent:@"HeadImage.temp"]; NSString* urlStr = [NSString stringWithFormat:@http://www.cocoachina.com/bbs/job.php?action=download&aid=44]; NSURL *url =[NSURL URLWithString:[urlStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]; NSDictionary *dic=[NSDictionary dictionaryWithObje
    lee409 7-4
  • 0
    项目中需要用到发短信功能 以下为常用代码,在头文件中加 #import <MessageUI/MessageUI.h> #import <MessageUI/MFMessageComposeViewController.h> 在头文件代理中加 MFMessageComposeViewControllerDelegate, MFMailComposeViewControllerDelegate 需要加上framework MessageUI.framework(上篇发邮件也需要此步骤) #pragma mark - 发送短信 MFMessageComposeViewController ///////////////////////////////////////////////////////////////////////////////// -(void)MessageCall:(NSString*)phoneNum { ///////////////////////////////////////////////////////////
    lee409 7-4
  • 0
    一些项目中需要用到邮件功能 以下为常用代码 #pragma mark - MFMailComposeViewController 发送邮件 系统邮件 /////////////////////////////////////////////////////////////////////////////// // 显示email的控件界面 参数为邮箱地址 -(void)EMailCall:(NSString*)email { Class mailClass = (NSClassFromString(@"MFMailComposeViewController")); if (mailClass != nil) { // We must always check whether the current device is configured for sending emails if ([mailClass canSendMail]) { [self displayComposerSheet:email]; } else { [self launchMailAppOnDevice]; } } else { [self
    lee409 7-4
  • 0
    项目中经常遇到需要拨打电话的功能 有些需求是要你拨打电话后回调到程序 以下代码正好可以解决此需求 //////////////////////////////////////////////// #pragma phoneCallWebView -(void)phoneCallWebView:(NSString*)tempCall { //此处处理字符串有+86情况 if([[tempCall substringWithRange:NSMakeRange(0,1)] isEqualToString:@"+"]) { tempCall = [tempCall substringWithRange:NSMakeRange(3,[tempCall length] - 3)]; } tempCall=[tempCall stringByReplacingOccurrencesOfString:@" " withString:@""]; NSURL *url= [NSURL URLWithString:[NSString stringWithFormat:@"tel://
    lee409 7-4
  • 0
    只有10%的程序员能写出二分查找,不包括我 查找在遇到读取大量数据的时候,遍历匹配判断影响性能。二分查找,很大程度上加快查询速度,要求是查找目标必须是有序的 -(int)binSearch:(NSArray*)array startKey:(int)start endKey:(int)end keyValue:(int)key { int left,right; int mid=[array count]/2;//找到中间的下标 left=start; right=end; while (left<right) //循环 { //此处为实际代码我数据每一行是以空格分开的数组 NSString *eachLine=[array objectAtIndex:mid]; eachLine=[eachLine stringByReplacingOccurrencesOfS
    lee409 7-4
  • 0
    最近使用NSThread启动一个线程,来获取数据,而且要更新主线程的ui 我的写法是这样 在需要的地方启动一个线程 -(void)buttonClicked:(id)sender { [NSThread detachNewThreadSelector:@selector(getData:) toTarget:self withObject:nil]; } //线程启动 -(void)getData { //加一个线程同步锁防止未处理完再次调用此线程获取数据 @synchronized(self) { //自动释放池 // NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; [NSRunLoop currentRunLoop];//不加这几句会console会不停打印NSAutoreleasePool 信息 //此处操作如何getD
    lee409 7-4
  • 0
    恶补基础 http://www.cocoachina.com/bbs/read.php?tid=92380&keyword=%D1
    lee409 7-4
  • 0
    先放上一些three20学习资料,以后再整理自己的心得 http://www.cocoachina.com/bbs/read.php?tid=101868&keyword=%D
    lee409 7-4
  • 1
    lee409 2012-07
    转 苹果 开发者账号如下: 99美金个人用户 99美金团队: 审核多了企业资质认证,可以多开发者共享.(如何共享?)这个测试的时候如果有多个人的话,可以拆分多个子账户出来测试,对于测试方便点。也就是说一个AppleID对应于多个Devices ID。 299美金企业用户: 面向拥有500雇员以上的公司,开发专用的企业内部使用的app。这个账号需要邓氏码,小企业一般申请不下来,但只要有那个码就好办了(500或者500以上的公司用于内部分发)。 为企业客户发布应
    lee409 7-4
  • 1
    apple99个人账号,配置证书的时候,需要去跟换cer证书,但是如果公司买的个人99账号,多人去配置证书就容易出问题,经常把别人的moblieprofile给删掉,导致其他项目的证书无效。 所以一般来说,一个人主管账号,由这个人电脑申请本机的csr,然后配置相应的证书。其他人需要证书的时候,则通过以下几步骤。
    lee409 7-3
  • 0
    在ios4中修改是: @implementation UINavigationBar (UINavigationBarCategory) - (void)drawRect:(CGRect)rect { UIImage *image = [UIImage imageNamed: @"title-bg.png"]; [image drawInRect:CGRectMake(0, 0, 320, 44)]]; } @end 在ios5中修改是: [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"title-bg.png"] forBarMetrics:UIBarMetricsDefault];//ios4使用,因为没有响应库,会导致异常 其中源码中指到 /* To customize the appearances for instances of a class contained within an instance of a container class, or instances in a hierarchy, use +appearanceWhen
    lee409 7-2
  • 0
    之前一直将触发事件写在scrollViewDidScroll下,导致每次滑动都没达到预期效果。应该写在scrollViewWillBeginDragging开始拖动事件中 - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView { if(noScroll==YES) { return; } else { if(isUp) { [self showPhonePad]; UITextField *tempTextField=(UITextField*)[phonePadView viewWithTag:100]; [tempTextField resignFirstResponder]; chieseKeyBoard=NO; noScroll=YES; } } } - (void)scrollViewDidScroll:(UIScrollView *)scrollView { } - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate {
    lee409 7-2
  • 0
    1、截图win7 本地连接 2、vmwork 1 不用设置 3、wmwork 8设置网段为本地连接网段,ip设置不同 4、设置mac系统,自动获取ip 5、vmwork设置如图
    lee409 6-17
  • 3
    【QWT简介】      QWT[1],全称是Qt Widgets for Technical Applications,是一个基于LGPL版权协议的开源项目, 可生成各种统计图。它为具有技术专业背景的程序提供GUI组件和一组实用类,其目标是以基于2D方式的窗体部件来显示数据, 数据源以数值,数组或一组浮点数等方式提供, 输出方式可以是Curves(曲线),Slider(滚动条),Dials(圆盘),Compasses(仪表盘)等等。该工具库基于Qt开发,所以也继承了Qt的跨平台特性。    &nbs
    wsydd123 5-18
  • 0
    1、下载jdkXX版本。 2、安装jdkxx版本。默认路径为C:\Program Files\Java\jdk1.6.0_02 3、右击我的电脑,属性,高级,环境变量,分别添加 JAVA_HOM
    lee409 10-29

  • 发贴红色标题
  • 显示红名
  • 签到六倍经验

赠送补签卡1张,获得[经验书购买权]

扫二维码下载贴吧客户端

下载贴吧APP
看高清直播、视频!

本吧信息 查看详情>>

会员: 水泥工

目录: 个人贴吧