- 博客(24)
- 资源 (6)
- 收藏
- 关注

原创 推荐一些大神的博客
OneV's Denhttp://onevcat.com/破船之家http://beyondvincent.com/NSHipsterhttp://nshipster.cn/Limboy 无网不剩http://limboy.me唐巧的技术博客http://blog.devtang.com/Lex iOS noteshttp://ios.lextang.c
2014-11-17 15:16:10
731
转载 XCode免证书开发环境
XCode免证书开发环境是本文要介绍的内容,如果你和我一样,是一名爱好iOS开发的开发者,并且又舍不得花费99美金去购买一个合法的开发License,这篇博客则非常适合你。如果,您是一位已经获得Apple开发者证书的开发者,则可以完全无视该篇Blog。在没有证书的情况下,开发iOS应用程序只能在功能有限的模拟器环境中运行你的应用程序(x86环境)。对于那些与硬件平台关系不大的iOS应用程序
2014-11-29 23:33:35
712
转载 NSUserDefaults的用法
NSUserDefaults适合存储轻量级的本地数据,比如要保存一个登陆界面的数据,用户名、密码之类的,个人觉得使用NSUserDefaults是首选。下次再登陆的时候就可以直接从NSUserDefaults里面读取上次登陆的信息咯。因为如果使用自己建立的plist文件什么的,还得自己显示创建文件,读取文件,很麻烦,而是用NSUserDefaults则不用管这些东西,就像读字符串一样,直接读取
2014-11-18 09:55:21
653
转载 Xcode基本操作
原文:http://blog.youkuaiyun.com/phunxm/article/details/170443370.认识Xcode1.主题及字体“command+,”呼叫出偏好设置(首选项),选择“Fonts &Colors”,选中一种主题(theme),例如“Midnight”,然后shift选择SourceEditor/Console中的所有项,点击Fonts
2014-11-17 22:08:24
801
转载 ios socket通信简介
原文地址:http://blog.youkuaiyun.com/xiaoweige207/article/details/6211577“一切皆Socket!”话虽些许夸张,但是事实也是,现在的网络编程几乎都是用的socket。——有感于实际编程和开源项目研究。我们深谙信息交流的价值,那网络中进程之间如何通信,如我们每天打开浏览器浏览网页时,浏览器的进程怎么与web服务器通信的?当你用QQ聊天
2014-11-17 22:03:01
780
原创 Block传值
// MyViewController.m// Block//// Created by cfy on 14-11-16.////#import "MyViewController.h"#import "SecondViewController.h"@interface MyViewController (){ UILabel * _la
2014-11-16 15:43:03
432
转载 代理传值
#import "FirstViewController.h" #import "SecondViewController.h" @interface FirstViewController () { UILabel * _label; } @end @implementation FirstViewController - (void)dealloc {
2014-11-16 15:40:57
454
原创 给tableview Cell添加动画(两种实现方法 效果还不错)
-(void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath*)indexPath{ // 1. 配置CATransform3D的内容 CATransform3D transform; tran
2014-11-15 17:51:10
1038
转载 iOS 7中实现模糊效果
本文译自iOS 7 Blur Effects with GPUImage。iOS 7在视觉方面有许多改变,其中非常吸引人的功能之一就是在整个系统中巧妙的使用了模糊效果。许多第三方应用程序已经采用了这样的设计细节,并以各种奇妙的和具有创造性的方式使用它。本文将通过几种不同的技术来实现iOS 7中的模糊效果,当然,这一切都利用了一个名为GPUImage的框架。GPUImage是由Brad
2014-11-15 14:41:29
752
原创 ios 字符串和数字互相转化
字符串使用NSString定义成一个用于保存字符串的对象变量,而数字则使用原始类型float、int定义成一个变量,这是一个原生态的变量。 这两种变量之间在开发时会需要相互转化。 下面是常用的转化方法: NSString *tempA = @"123"; NSString *tempB = @"456"; 1、字符串拼接 NSString *newString = [NSString strin
2014-11-14 20:48:43
778
原创 NSString拼接字符串
NSString截取字符串归纳1.substringWithRange: 专门截取字符串的一部分 NSMakeRange(4,2) 从第4个字符开始截取,长度为2个字符,(从0开始) b = [a intValue]; 将 a 转换为 整数型 b = [a floatValue]; 将 a 转换为 小数型 b = [a boolValue];
2014-11-14 20:46:23
530
转载 OC中类的扩展介绍
1、子类 subClass作用:可以使用类的继承来增添父类的变量和方法。写法:在.h文件中@interface Student :Person2、分类 Category作用:可以增添父类的功能,但不能定义变量。多用于不知道源码的情况下,对父类进行扩展。写法:在.h和.m文件中,文件名为”父类名+分类名”格式。在@interface @implementation 后
2014-11-14 09:13:18
435
转载 UIStepper的常用方法
UIStepper *oneStepper = [[UIStepperalloc]init]; oneStepper.frame =CGRectMake(20,20,20,20); oneStepper.backgroundColor = [UIColorblueColor];//设置背景色 oneStepper.tintColor
2014-11-14 09:11:43
435
原创 NSLOg
如果不需要log,把1 改成0#if1#define NSLog(FORMAT, ...) fprintf(stderr,"[%s:%d行] %s\n",[[[NSString stringWithUTF8String:__FILE__] lastPathComponent] UTF8String], __LINE__, [[NSString stringWithFormat:
2014-11-13 16:29:30
418
原创 ios ViewController 页面跳转
从一个Controller跳转到另一个Controller时,一般有以下2种:1、利用UINavigationController,调用pushViewController,进行跳转;这种采用压栈和出栈的方式,进行Controller的管理。调用popViewControllerAnimated方法可以返回。 PickImageViewController *ickImage
2014-11-13 16:25:33
439
原创 UITextView
self.textView= [[[UITextViewalloc]initWithFrame:CGRectMake(10,70,self.view.frame.size.width-20,100)]autorelease]; self.textView.textColor= [UIColorblackColor]; self.textView.au
2014-11-13 16:24:02
450
原创 iOS 导航栏上加搜索框
UISearchBar* searchbar = [[UISearchBaralloc]initWithFrame:CGRectMake(0.0f,0.0f,255.0f,44.0f)]; searchbar.delegate=self; [searchbarsetTintColor:[UIColorredColor]]; [
2014-11-13 16:22:02
8423
原创 安装CocoaPods步骤
CocoaPods使用步骤(已有Ruby环境):(注:$为提示作用,不要在终端 https://rubygems.org/等有反应之后再敲入以下命令$ gem sources -a http://ruby.taobao.org/为了验证你的Ruby镜像是并且仅是taobao,可以用以下命令查看:$ gem sources -l只有在终端中出现下面文字才表明你上面
2014-11-13 16:20:10
1063
原创 图片圆角设置
//圆角设置imageView.layer.cornerRadius = 8;(值越大,角就越圆)imageView.layer.masksToBounds = YES;//边框宽度及颜色设置[imageView.layer setBorderWidth:2];[imageView.layer setBorderColor:[UIColor blueColor]]; //设
2014-11-13 16:17:49
575
转载 UISwitch的使用方法详细(转)
// UISwitch的使用 UISwitch *oneSwitch = [[UISwitchalloc]initWithFrame:CGRectMake(20,20,0,0)];//默认尺寸为79 * 27。 oneSwitch.backgroundColor = [UIColorgreenColor];//设置背景色 one
2014-11-13 16:13:51
696
原创 NSDate
只保留日期如下 NSDateFormatter *dateFormtter=[[NSDateFormatter alloc] init]; [dateFormtter setDateFormat:@"yyyy-MM-dd"]; NSString *dateString=[dateFormtter stringFromDate:[NSDate date]]; ###格式化参数如下: ```
2014-11-13 16:11:08
429
转载 UIImageView的使用方法详细
/ UIImageView的常用方法 UIImage*oneImage = [UIImageimageNamed:@"max.png"]; // 使用ImageView通过name找到图片 UIImageView *oneImageView = [[UIImageViewalloc]initWithImage:oneImage];//把oneIma
2014-11-13 15:54:47
511
原创 键盘弹出和收起的通知
//订阅键盘升起的系统通知 UILabel* label = [[UILabelalloc]initWithFrame:CGRectMake(0,0,220*2,30)];在- (void)viewDidLoad写下面的代码 [[NSNotificationCenterdefaultCenter]addObserver:self
2014-11-13 15:51:39
540
原创 有一字符串,包含数字与字母,编程去除数字。要求:1要求在原字符串中操作 2、使用指针处理
char str[] ="sfneh3q4j55mntr4563r76nklkh5n45"; char * p =str; int i = 0; char temp[255] = {0}; while (*(p+i) != '\0') { if (*(p + i) >='0'&& *(p +i) strcpy(t
2014-08-05 21:13:20
878
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人