拼音 名字 排序 a-z的比较 ( sortUsingComparator )

 NSMutableArray * array = [NSMutableArrayarrayWithObjects:@"ad",@"az",@"ac",@"ab",@"aa", nil];

    DLog("ar :: %@",array);

    [array sortUsingComparator:^NSComparisonResult(id obj1, id obj2) {

        return [obj1 localizedStandardCompare:obj2];

    }];

    DLog("ar :: %@",array);

画线1:    

  //Define line width and cap

    CGContextSetLineWidth(ctx, TB_BACKGROUND_WIDTH);

    CGContextSetLineCap(ctx, kCGLineCapButt);

    CGPoint p1 =    CGPointMake(10, 10);

    CGPoint p2 =            CGPointMake(40, 10);

    CGPoint p3 =    CGPointMake(40, 30);

    CGPoint p4 =            CGPointMake(10, 30);

    CGPoint points[4] = {p1,p2,p3,p4};

   

    CGContextAddLines(ctx, points, 3);

画线2:    

CGContextAddLineToPoint

比较:http://blog.sina.com.cn/s/blog_67a5e4720100yeky.html

原文地址:https://www.cnblogs.com/zander/p/3139167.html