Skip to content

Instantly share code, notes, and snippets.

#ifdef DEBUG
@interface AFHTTPClient (Cheating)
@property (nonatomic, assign) BOOL allowsInvalidSSLCertificate;
@end
row = [];// outer array
for (product in productsArray) {
innerArray = []; // inner array
if (product.image is large) {
array add product;
} else if (product image is small) {
把row 数组的最后一个拿出来,看看
如果只有一个,还是large image,我们就不管了
http://nshipster.com/cggeometry/
git checkout -b test_brack_pr
git remote add brack git@github.com:brack/stagestores.ios.git
git fetch brack
git merge brack/cmshost
git checkout -b release upstream/next-release
CGFloat height = CGRectGetHeight(scrollView.frame);
CGFloat contentYoffset = scrollView.contentOffset.y;
CGFloat distanceFromBottom = scrollView.contentSize.height - contentYoffset;
Reasoning behind this particular convention is that the pointer belongs to the instance and not the class. If you were to declare multiple variables on a single line, you'd expect each variable to have its own pointer like so:
NSArray *array1, *array2, *array3;
So we need to declare like this NSArray *array1
CGRectInset(self.view.bounds, 8.0, 0.0)
Description
Returns a rectangle that is smaller or larger than the source rectangle, with the same center point.
A rectangle. The origin value is offset in the x-axis by the distance specified by the dx parameter and in the y-axis by the distance specified by the dy parameter, and its size adjusted by (2*dx,2*dy), relative to the source rectangle. If dx and dy are positive values, then the rectangle’s size is decreased. If dx and dy are negative values, the rectangle’s size is increased.
//(function(Worker) {
// if (!Worker) {
// console.log('Web Worker not found.')
// return;
// }
//
// var postMessage = Worker.prototype.postMessage;
//
// Worker.prototype.postMessage = function(data) {