ios代码片段
文章平均质量分 73
song471168568
这个作者很懒,什么都没留下…
展开
-
ios 给出一张图片,返回一个指定大小的图片
/*-------------------------------------------------- * 根据size截取图片中间矩形区域的图片 这里的size是正方形 ---------------------------------------------------*/ -(UIImage *)cutCenterImage:(UIImage *)image si原创 2014-02-25 11:00:26 · 949 阅读 · 0 评论 -
ios 画图
CGContextRef context = UIGraphicsGetCurrentContext(); /*NO.1画一条线 CGContextSetRGBStrokeColor(context, 0.5, 0.5, 0.5, 0.5);//线条颜色 CGContextMoveToPoint(context, 20, 20); CGContextAddL原创 2014-02-25 11:11:35 · 505 阅读 · 0 评论 -
ios自定义hub指示器
UIView *loadingView = [[UIView alloc] initWithFrame:CGRectMake((self.view.frame.size.width - 80) / 2.0f, ([UIScreen mainScreen].bounds.size.height - 80.f)/ 2.0f, 80.0f, 80.0f)]; [l原创 2014-02-25 11:15:26 · 954 阅读 · 0 评论 -
在数字键盘上添加button
//定义一个消息中心 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:nil]; //addObserver:注册一个观察员 name:消息名称 - (void)key原创 2014-02-26 14:59:49 · 771 阅读 · 0 评论