08 2014 档案
摘要:代码:/*去掉iphone手机滑动默认行为*/$('body').on('touchmove', function (event) { event.preventDefault();});
阅读全文
摘要:1. 画矩形和写字 2. 射线渐变 3. 居中文字 4. 图片 5. 画布中的画布
阅读全文
摘要:计算一个向量的值var vectorMagnitude = Math.sqrt(Math.pow(vector.x, 2) +Math.pow(vector.y, 2));单位向量var vectorMagnitude = Math.sqrt(Math.pow(vector.x, 2) +Math....
阅读全文
摘要:Cocoa is a dynamically typed language, and you can easily get confused about what type you are working with.Collections (arrays, dictionaries, and so ...
阅读全文
摘要:Problem:How to create a layer that looks like your notification center's or control center's backgroundSolution:Using UIImage+ImageEffects to Create a...
阅读全文
摘要:以前学过C/C++/Java/C#语言的童鞋可能刚开始对于OC的方法和参数的命名规范大为不爽举例来说,如下一个OC方法:- (void)tableView:(UITableView *)tableViewcommitEditingStyle:(UITableViewCellEditingStyle)...
阅读全文
摘要:iOS中CollectionCiew由于多次点击,会给程序造成错误。这个时候,我们可以用过手势类来进行判断和过滤。但是,有一个快捷的解决方法,那就是给用户响应增加延时操作。具体代码如下:[collectionView setUserInteractionEnabled:NO];[collection...
阅读全文