摘要: 一:终端进入cd /usr/share/vim/二:sudo vim vimrc三:添加syntax enablesyntax on四:保存退出 阅读全文
posted @ 2013-08-27 12:04 cocoajin 阅读(406) 评论(0) 推荐(0) 编辑
摘要: 一:使用 cocoaPod错误The platform of the target `Pods` (iOS 4.3) is not compatible with `AFNetworking (1.3.2)` which has a minimum requirement of OS X 10.7 - iOS 5.0.二:解决方案 打开项目中 Podfile 文件 修改其 iOS平台为对应平台 阅读全文
posted @ 2013-08-27 11:27 cocoajin 阅读(579) 评论(0) 推荐(0) 编辑
摘要: + (KKTextHUB *)sharedTextHUB{ static KKTextHUB *sharedHub = nil; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ sharedHub = [[self alloc]initWithFrame:CGRectMake(0, 0, 0, 0)]; }); return sharedHub;} 阅读全文
posted @ 2013-08-20 16:38 cocoajin 阅读(169) 评论(0) 推荐(0) 编辑
摘要: - (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext(); UIGraphicsPushContext(context); CGRect boxRect = CGRectMake(0, 0, 90,90); float radius = 10.0f; CGContextBeginPath(context); CGContextMoveToPoint(context, CGRectGetMinX(boxRect) + radius, ... 阅读全文
posted @ 2013-08-20 16:35 cocoajin 阅读(2044) 评论(0) 推荐(0) 编辑
摘要: 一、到http://regexkit.sourceforge.net/下载RegexKitLite类,添加到项目中;因为RegexKitLite使用ICU库,所以需要动态链接到/usr/lib/libicucore.dylib库当中去,否则你会得到13个错误。具体Dynamically linked to /usr/lib/libicucore.dylib方法如下1.进入菜单Project->Edit Project Settings2.在搜索框内输入linker搜索,找到”Other Linker Flags”选项。加入一个新的标签,名为-licucore。(这样可能更好:工程中添加l 阅读全文
posted @ 2013-08-17 13:36 cocoajin 阅读(405) 评论(0) 推荐(0) 编辑
摘要: 一: NSDateFormatter *dateFormater = [[NSDateFormatter alloc]init]; [dateFormater setDateFormat:@"yyyy-MM-dd HH:mm:ss"]; NSTimeZone* localzone = [NSTimeZone localTimeZone]; NSTimeZone* GTMzone = [NSTimeZone timeZoneForSecondsFromGMT:0]; [dateFormater setTimeZone:GTMzone]; [dateForm... 阅读全文
posted @ 2013-08-16 12:51 cocoajin 阅读(564) 评论(0) 推荐(0) 编辑
摘要: UISlider *aslider = [[UISlider alloc]initWithFrame:kCR(50, 50, 200, 200)]; [aslider setValue:0.5]; [aslider setThumbImage:[UIImage imageNamed:@"ssuibian .png"] forState:UIControlStateNormal]; [aslider setThumbImage:[UIImage imageNamed:@"ssuibian .png"] forState:UIControlStateHigh 阅读全文
posted @ 2013-08-12 17:19 cocoajin 阅读(687) 评论(0) 推荐(0) 编辑
摘要: 方法一: UILabel *mindName = [[UILabel alloc]initWithFrame:kCR(0, 0, 25,40)]; mindName.text = @"苏\n小\n明"; mindName.numberOfLines = [mindName.text length]; 方法二:// NSString *text = @"一";// NSString *strText = @"苏得强";// UIFont *font = [UIFont systemFontO... 阅读全文
posted @ 2013-08-12 10:51 cocoajin 阅读(2278) 评论(0) 推荐(0) 编辑
摘要: 1:假如有6个图片:那个,Scrollview的大小加 7 个图片的大小2: //ImageScrollView; UIScrollView *imageScroll = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, 320, 210)]; imageScroll.bounces = YES; imageScroll.pagingEnabled = YES; imageScroll.userInteractionEnabled = YES; imageScroll.showsVerticalScrollI... 阅读全文
posted @ 2013-08-10 15:39 cocoajin 阅读(472) 评论(0) 推荐(0) 编辑
摘要: SEL selAction =NSSelectorFromString([actionArrayobjectAtIndex:indexArray]);[item addTarget:self action:selAction];Objective-C在编译的时候,会根据方法的名字(包括参数序列),生成一个用 来区分这个方法的唯一的一个ID,这个ID就是SEL类型的。我们需要注意的是,只要方法的名字(包括参数序列)相同,那么它们的ID都是相同的。就是 说,不管是超类还是子类,不管是有没有超类和子类的关系,只要名字相同那么ID就是一样的。我们可以方便的通过方法的名字,获取到方法的ID也就是我们所说 阅读全文
posted @ 2013-08-10 11:35 cocoajin 阅读(991) 评论(0) 推荐(0) 编辑