ios 在View里绘图
摘要:1、新建ViewBasedApplication2、添加一个新的objective-c class,并设置为UIView的子类,可以命名为MyView3、重写MyView的方法- (void)drawRect:(CGRect)rect这个方法是在MyView里定义的,重写这个方法可以显示自己重绘的内容在方法内,添加以下代码,实现渐变颜色CGContextRef context = UIGraphicsGetCurrentContext(); CGColorSpaceRef rgb = CGColorSpaceCreateDeviceRGB(); CGFloat colors[] = { 204
阅读全文
posted @
2012-03-24 18:29
袁晓平
阅读(2415)
推荐(0)
ios画图总结
摘要:0CGContextRef context = UIGraphicsGetCurrentContext(); 设置上下文 1 CGContextMoveToPoint 开始画线 2 CGContextAddLineToPoint 画直线 4 CGContextAddEllipseInRect 画一椭圆 4 CGContextSetLineCap 设置线条终点形状 4 CGContextSetLineDash 画虚线 4 CGContextAddRect 画一方框 4 CGContextStrokeRect 指定矩形 4 CGContextStrokeRectWithWidth 指定矩形线宽度.
阅读全文
posted @
2012-03-24 18:20
袁晓平
阅读(2470)
推荐(0)
无线网卡共享网络发射
摘要:先运行以下脚本netsh wlan set hostednetwork mode=allow ssid=abc key=88888888netsh wlan start hostednetwork然后在有线网络上共享一下,选择新建的网络abc即可,这样就可以用手机连到网络abc访问了
阅读全文
posted @
2012-03-23 18:07
袁晓平
阅读(207)
推荐(0)