我在用CGContextRef
.
UIGraphicsBeginImageContext(self.drawImage.frame.size);
CGContextRef context=UIGraphicsGetCurrentContext();
CGContextSetRGBStrokeColor(context,0.0f,0.0f,0.0f,1.0f);
UIGraphicsEndImageContext();
CGContextRelease(context);
Run Code Online (Sandbox Code Playgroud)
我是否需要拨打CGContextRelease(Context);
上述电话.
如何将静态库合并为单个库?
我有三个静态库libSignatureLibary_armv6.a,libSignatureLibary_armv7.a和libSignatureLibary_i368.a
现在我想将这三个文件合并到一个可以命名为libSignatureLibary.a的单个库中
谷歌搜索时我发现lipo是开源工具!
我是否需要运行任何额外的脚本语言才能合并
或在终端脂肪中并传递脂质的参数.
任何建议我可以为这三个建立公共库.
@thanks提前Kiran
如何获得枚举数
我有一个Enum
typedef enum{
DEL_TIME_VALUE = -1,
DEL_TIMESEC_VALUE = 100,
DEL_TIMEMIN_VALUE = 200,
DEL_TIMEHOUR_VALUE = 300,
DEL_DAY_VALUE = 1000,
DEL_COUNT_VALUE = 1000,
....
.....
.....
DEL_END =90002
}WORKINGTIME;
Run Code Online (Sandbox Code Playgroud)
我如何得到枚举计数.
我在下面尝试循环!
for(int i=DEL_TIME_VALUE; i<=DEL_END; i++) {
}
Run Code Online (Sandbox Code Playgroud)
我猜它不好!
任何人都可以告诉我如何获得枚举数!在枚举中声明.
提前致谢!
球队,
我创建了新项目,在项目文件夹右键单击打开show in finder,我创建了"ViewControllers"文件夹并再次右键单击Add files to"ProjectName"然后我添加了创建的文件夹,即"ViewControllers",它是蓝色的"预期黄色文件夹"是指我的项目文件夹中的蓝色文件夹不是.在蓝色文件夹中,当我尝试添加新文件时,它添加了一个空文件.
如何将我添加的文件夹引用到Xcode项目?如何在我的项目中避免这个蓝色文件夹类?
您的意见非常明显.
我在UIImageView上使用CGContext和Bezierpath设置画笔模式.
这是一个好方法吗?
我们是否有任何其他最佳实践来设置画笔图案,以创建不同的画笔图案.
在实现我的画笔时,有没有人可以使用不同的设计模式?
如何设置UIColor
值CGContextSetRGBStrokeColor
//这是红色,我设置为CGContextSetRGBStrokeColor
CGContextSetRGBStrokeColor(contextRef,1,0,0,1.00f);
现在我有UIColor,它有RGB值我需要设置这个值CGContextSetRGBStrokeColor
.
任何人都建议我如何设定UIColor
价值CGContextSetRGBStrokeColor
在移动设备上安装应用程序后,将设备时间更改为一周前。并尝试打开应用程序说"MyAppName" Is No Longer Available.
任何人都面临这个问题,请告诉我,您的投入是可观的。
Unknown class CPTGraphHostingView in Interface Builder file.
2012-01-09 16:09:34.242 ChartArea[2595:207] -[UIView setHostedGraph:]: unrecognized selector sent to instance 0x4c064f0
2012-01-09 16:09:34.245 ChartArea[2595:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView setHostedGraph:]: unrecognized selector sent to instance 0x4c064f0'
Run Code Online (Sandbox Code Playgroud)
这是我今晚得到的错误.我正在设置CPTGraphHostingView的类名到我的uiview在interfacebuilder中.
CGContextRef currentContext = UIGraphicsGetCurrentContext();
UIGraphicsBeginImageContext(drawImage.frame.size);
[drawImage.image drawInRect:CGRectMake(0,0, drawImage.frame.size.width, drawImage.frame.size.height)];
CGContextSetRGBStrokeColor(currentContext, 0.0, 0.0, 0.0, 1.0);
UIBezierPath *path=[self pathFromPoint:currentPoint
toPoint:currentPoint];
CGContextBeginPath(currentContext);
CGContextAddPath(currentContext, path.CGPath);
CGContextDrawPath(currentContext, kCGPathFill);
drawImage.image = UIGraphicsGetImageFromCurrentImageContext();
Run Code Online (Sandbox Code Playgroud)
在上面CGContextRef currentContext
创建的代码中UIGraphicsGetCurrentContext()
,将它传递给 CGContextBeginPath CGContextAddPath CGContextDrawPath
currentContext有参数,它对我不起作用!当我在做的时候touchMovie
.
当我直接UIGraphicsGetCurrentContext()
代替currentContext
它为我工作.我想知道为什么会那样?
@All请告诉我这个问题.