自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 收藏
  • 关注

转载 p12文件转pen文件

今天做百度推送要求用pem,之前用的激光推送用的p12,研究了一会怎么把p12文件转成pem文件,废话不多说上代码。1 分别倒出证书的p12和key的p12分别倒出devp12.p12 (证书) devkeyp12.p12(key)2 p12转pem打开终端1>openssl pkcs12 -clcerts -nokeys -out devp12.pem -in (直...

2016-08-17 15:01:00 145

转载 cell的下划线对齐显示

//使cell的下划线顶头,-(void)tableView:(UITableView )tableView willDisplayCell:(UITableViewCell )cell forRowAtIndexPath:(NSIndexPath *)indexPath{if ([cell respondsToSelector:@selector(setSeparatorInse...

2016-03-15 17:51:00 249

转载 ios 根据字符串中的逗号分行显示

//自动计算高宽(CGSize)sizeWithText:(NSString )text font:(UIFont )font maxSize:(CGSize)maxSize{NSDictionary *attrs = @{NSFontAttributeName : font};return [text boundingRectWithSize:maxSize options:...

2016-03-15 11:32:00 306

转载 textfield 和textview回收键盘的简单方法

textview和textfield都要遵守协议才能实现键盘回收的方法 UITextViewDelegate或者UITextFieldDelegatetextView.returnKeyType=UIReturnKeyDone;//返回按钮textField.returnKeyType=UIReturnKeyDone;//返回按钮//textfield取消第一响应者的方法-(BO...

2016-03-09 08:52:00 100

转载 改变textfield中placeholder字体大小和颜色的方法

写项目偶遇改变textfield的placeholer字体颜色和大小,不想自定义textfield就搜了一下,感觉这个方法很实用,就随手记下了self.textField.placeholder=@"请输入支付密码";//改变颜色[self.textField setValue:[UIColor grayColor] forKeyPath:@"_placeholderLabel.t...

2016-03-02 14:25:00 558

转载 cell 下划线左对齐的问题

-(void)setLastCellSeperatorToLeft:(UITableViewCell *)cell{if ([cell respondsToSelector:@selector(setSeparatorInset:)]){ [cell setSeparatorInset:UIEdgeInsetsZero]; }if ([cell resp...

2016-01-27 11:40:00 155

转载 UIAlertController 的简单使用方法

- (void)viewDidLoad { [super viewDidLoad]; UIButton *btn=[UIButton buttonWithType:UIButtonTypeCustom]; btn.frame=CGRectMake(10, 60, 80, 30); [btn setTitle:@"提示框" forState:UICo...

2016-01-08 12:03:00 130

转载 NSObject 模态问题

//1 创建需要模态的控制器BSLoginVC *loginVC=[[BSLoginVC alloc] init];//2 获取主控制器UIViewController *VC=[UIApplication sharedApplication].keyWindow.rootViewController;//3 主控制器模态到控制器 [VC presentViewControlle...

2016-01-07 14:50:00 82

转载 iOS 跳转系统设置

1 app位置访问 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:UIApplicationOpenSettingsURLString]];2 系统隐私设置 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs...

2015-12-29 13:16:00 96

转载 多线程的简单应用

全局并发队列//添加touch事件显示图片-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ //1获得主队列 线程之间的通讯 //异步并行 dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEF...

2015-08-21 19:00:00 80

转载 定义一个计算字符串高度的方法

//计算字符串高度的方法-(CGFloat)stringHeight:(NSString *)str{ //设置字符串的属性 NSDictionary *dic=@{NSFontAttributeName:[UIFont systemFontOfSize:17]}; //计算字符串的区域 CGRect rect=[str boundingRectWithSize...

2015-06-22 17:01:00 106

转载 字典转模型

1创建关于人信息的数据源person.plist2 创建一个person类3 控制器中创建一个person数组,接收数据存放person-(NSArray *)person{ if(_person==nil){ //1获取plist的全路径 NSString *filepath=[[NSBundle mainBundle] pathFo...

2015-06-20 17:45:00 71

转载 UIScrollView和UIPageControl

UIScrollView和UIPageControl 一般配合使用//创建一个滑动/滚动的视图,大小和当前视图大小一样(可以自定义大小) UIScrollView *scrollView=[[UIScrollView alloc] initWithFrame:self.view.bounds]; //设置显示内容区域的大小,宽度是当前视图的6倍(可以自定义大小),...

2015-06-16 21:23:00 88

转载 oc 2 NSArray小结

//1 数组的创建 NSArray *array=[[NSArray alloc] initWithObjects:@"1",@"2",@"3", nil]; NSArray *array1=[[NSArray alloc] initWithArray:array]; NSArray *array2=[NSArray arrayWithObjec...

2015-06-06 14:55:00 85

转载 OC 1 NSString的小结

//字符串的创建 NSString *str1=@"hello world , are you ok"; NSString *string1=[NSString stringWithFormat:@"%@",@"hello"]; NSLog(@"%@",string1); //1 length 侧字符串的长度...

2015-06-06 14:46:00 101

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除