笔记
文章平均质量分 56
望学海
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
fmdb 数据库简单使用
FMDB 学习笔记//// UserDB.m// FMDB//// Created by GuoBIn on 15/7/20.// Copyright (c) 2015年自强不息. All rights reserved.//#import "UserDB.h"#import #原创 2015-07-20 21:24:57 · 406 阅读 · 0 评论 -
CGContextRef详解
/* CoreGraphics - CGContext.h *//** Graphics state functions. **/ //为了让开发者在进行坐标变换时无须计算多次坐标变换后的累加结果,Quartz 2D还提供了如下两个方法来保存、恢复绘图状态/* 保存CGContextRef当前的绘图状态,方便以后恢复该状态*/voi原创 2016-05-06 17:33:51 · 10946 阅读 · 1 评论 -
GCD详解
什么是GCD?Grand Central Dispatch或者GCD,是一套底层API,提供了一种新的方法来进行并发程序编写。使用GCD来提升程序性能以及发挥多核系统优势.GCD的工作原理:让程序平行的特定任务,根据可用的处理资源,安排他们在任何可用的处理器核心上执行任务.GCD提供了很多超越传统多线程编程的优势.简单易用,居于block的血统,导致它能极为简单原创 2016-03-12 16:47:45 · 2972 阅读 · 2 评论 -
环信tokey转字符串
-(NSString *)stringWithDeviceToken:(NSData *)deviceToken { const char *data = [deviceToken bytes]; NSMutableString *token = [NSMutableStringstring]; for (int i =0; i原创 2016-05-25 13:16:26 · 508 阅读 · 0 评论 -
运行时获取属性列表
#import unsigned int count; objc_property_t *properties = class_copyPropertyList([self class], &count); for (int i =0; i objc_property_t property = prope原创 2016-04-27 16:42:32 · 492 阅读 · 0 评论 -
php的header函数之设置content-type
http://blog.youkuaiyun.com/kankan231/article/details/37929409设置常用的content-type:[php] view plain copy//定义编码 header( 'Content-Type:text/html;charset=utf-8 ');转载 2016-04-10 19:11:36 · 590 阅读 · 0 评论 -
"The repository is locked."使用bitbucket出现的问题
解决方法 1 Close Xcode 2 Open the .git folder in your xcode project folder. The folder is hidden, so you would need to either use terminal to open the directory or the "Go to Folder" option原创 2016-03-28 17:49:14 · 2462 阅读 · 0 评论 -
判断字符串是否有汉字
NSString *bundleName = @"abcd宾"; for (int i = 0; i < bundleName.length; i++) { NSRange range=NSMakeRange(i,1); NSString *subString = [bundleName substringWithRange:rang原创 2016-04-13 13:11:58 · 434 阅读 · 0 评论 -
简单使用VFL添加约束布局
学习笔记 以前布局都是在故事版添加约束的(我是不会告诉你们,我其实是不会代码布局的)。由于好奇今天我就捣鼓了一下午,感觉VFL挺直观的。废话不多说了,贴代码。- (void)example_1 { // redView在父视图的上边缘,距离15 [selfsuperView:self.view :@"V:|-15原创 2015-07-06 17:53:50 · 595 阅读 · 0 评论 -
UIPanGestureRecognizer和UISwipeGestureRecognizer冲突?
当实现拖手势(UIPanGestureRecognizer)后将不能响应左右划(UISwipeGestureRecognizer)事件,事件会被拖手势栏截,所以左右划和拖手势只能选其一. 但是即需要拖手势还需要左右划手势呢? 我想到了一个简单方案.在UIPanGestureRecognizer基础上做一个轻滑手势.在一定的时间范围内滑动,视为左右划手势,反之为拖手势.原创 2016-04-25 17:41:54 · 3765 阅读 · 0 评论 -
使用 arc4random获取随机数
int x = arc4random() % 100; // 获取一个随机整数范围 0 ~ 99 // 获取一个随机整数,范围在[from,to),包括from,不包括to int getScopeInsideRandomValue(int from, int to) { return (int)(from + (ar原创 2016-03-11 10:55:59 · 5108 阅读 · 0 评论 -
根据三角形三边一内角,计算出显示在视图上的坐标点
CGFloat w = self.frame.size.width; CGFloat h = self.frame.size.height; int rectangle = w > h ? h : w; // 画布大小 double mMultiples = 1.0; // 缩放比例// double a = 60原创 2016-03-09 10:25:33 · 574 阅读 · 0 评论 -
删除配置文件 Xcode->Code Signing->Provisioning Profile
~/Library/MobileDevice/Provisioning Profiles原创 2016-02-19 11:19:23 · 440 阅读 · 0 评论 -
iOS 获取当前时间戳和时间
NSDate *senddate = [NSDatedate]; NSLog(@"date1时间戳 = %ld",time(NULL)); NSString *date2 = [NSStringstringWithFormat:@"%ld", (long)[senddatetimeIntervalSince1970原创 2016-02-18 17:20:02 · 30519 阅读 · 0 评论 -
iOS 文档移植
刚换了一台电脑,想把旧电脑Xcode上下载的文档,移植到新电脑Xcode上。这个很简单,只需要在旧电脑拷贝一份文档文件,在相应的文件路径粘贴文档即可。路径如下:/Users/****/Library/Developer/Shared/Documentation/DocSets/com.apple.adc.documentation.iOS.docset 发现一个问题,新原创 2016-02-02 12:24:19 · 433 阅读 · 0 评论 -
UITextView 禁止弹出复制
UILongPressGestureRecognizer *longPress = [[UILongPressGestureRecognizeralloc] initWithTarget:selfaction:@selector(longPressAction)]; longPress.minimumPressDuration =0.5f; [textV原创 2016-01-26 10:46:50 · 1186 阅读 · 0 评论 -
iOS 跳转到AppStore 详情页 评论页
跳转到详情页一、获取应用链接。可以从这里获取。https://linkmaker.itunes.apple.com/en-us/?&country=us&media=appleMusic&genre=all 获取到的链接是这样的 https://geo.itunes.apple.com/cn/app/qq/id444934666?mt=8把它改成itms-apps://itu原创 2015-12-18 09:58:23 · 989 阅读 · 0 评论 -
UIBezierPath详解
使用UIBezierPath类可以创建基于矢量的路径,这个类在UIKit中。此类是Core Graphics框架关于path的一个封装。使用此类可以定义简单的形状,如椭圆或者矩形,或者有多个直线和曲线段组成的形状。Bezier Path 基础 UIBezierPath对象是CGPathRef数据类型的封装。path如果是基于矢量形状的,都用直线和曲线段去创建。我们使用直原创 2016-05-04 18:25:54 · 17110 阅读 · 0 评论
分享