在从前置摄像头捕获数据时,我总是获得镜像,如何在预览窗口中看到我所看到的内容.我已经准备好videoMirrored了TRUE.以下是代码段:
AVCaptureConnection *lConnection = nil;
for ( AVCaptureConnection *connection in [lHandle->m_output connections]) {
for ( AVCaptureInputPort *port in [connection inputPorts] ) {
if ( [[port mediaType] isEqual:AVMediaTypeVideo] ) {
lConnection = connection;
break;
}
}
}
if ([lConnection isVideoOrientationSupported])
[lConnection setVideoOrientation:AVCaptureVideoOrientationPortrait];
if ([lConnection isVideoMirroringSupported])
[lConnection setVideoMirrored:TRUE];
Run Code Online (Sandbox Code Playgroud)
更改setVideoMirrored为True/False也不会更改任何内容(isVideoMirroringSupported返回成功)
嗨Google Drive API支持人员,
在过去的几天里,我们遇到了Google云端硬盘的严重问题.
我们无法再使用图片更新文档文档.当我们的iPhone应用程序发送使用图像更新Docs文档的请求时,服务器返回OK,但内部图像将永远不会上传.
再现问题的代码在这里.
- (void)selfOverwriteSelectedFile:(GTLDriveFile *)gtlDriveFile
{
// -- not working type -- can't upload images on ODT, HTML, RTF, PDF
NSString *mimetype = @"application/vnd.oasis.opendocument.text"; //@"text/html" @"application/rtf" @"application/pdf"
//works: DOCX
//NSString *mimetype = @"application/vnd.openxmlformats-officedocument.wordprocessingml.document";
NSString *downloadUrl = [gtlDriveFile.exportLinks additionalPropertyForName:mimetype];
//1st request: download the file
GTMHTTPFetcher *fetcher = [self.driveService.fetcherService fetcherWithURLString:downloadUrl];
[fetcher beginFetchWithCompletionHandler:^(NSData *data, NSError *error) {
//2nd request: re-upload the same file
gtlDriveFile.mimeType = mimetype;
GTLUploadParameters *uploadParameters = [GTLUploadParameters uploadParametersWithData:data MIMEType:mimetype];
GTLQueryDrive *query = [GTLQueryDrive queryForFilesUpdateWithObject:gtlDriveFile fileId:gtlDriveFile.identifier uploadParameters:uploadParameters]; …Run Code Online (Sandbox Code Playgroud) 在我的应用程序中,我需要显示具有不同自定义字体的阿拉伯文本.我按照添加ttf文件的方案info.plist.
根据上述情况,我成功获得了不同字体样式的显示文本仅适用于ENGLISH文本.我为阿拉伯语字体样式做同样的事情,但在这里我没有得到.为什么会这样?
请任何人都可以帮助我
提前致谢.
我有一个非常愚蠢的问题我只是简单地输入on double并将其添加到已经声明的其他double并分配一个值但sum并未显示浮点数
double d = 4.0;
// Getting second double from user
double numDouble = Double.Parse(Console.ReadLine());
//Printing double number :
Console.WriteLine(d + numDouble);
Run Code Online (Sandbox Code Playgroud)
结果总是4.0 + 2.0 = 6但我想6.0
任何想法
我正在开发一个应用程序,我必须显示50到70个图像(精灵).我已经制作了一个滚动滚动所有这些图像,但我也想缩放这些图像我也一直在关注" http:// ganbarugames .com/2010/12/detected-touch-events-in-cocos2d-iphone / "这个教程.我想要完全相同的东西,但是那个教程只为一个精灵做了缩放的东西,但我想在每个精灵上做什么我该怎么办?请帮帮我?
-(void)ccTouchMoved:(UITouch *)touch withEvent:(UIEvent *)event
{
CGPoint touchPoint = [touch locationInView:[touch view]];
touchPoint = [[CCDirector sharedDirector]convertToGL:touchPoint];
self.position = ccp((-(currentScreen-1)*scrollWidth)+(touchPoint.x-startSwipe),0);
--> NSArray *touchArray = [touches allObjects];
if([touchArray count] > 1)
{
UITouch *fingerOne = [touchArray objectAtIndex:0];
UITouch *fingerTwo = [touchArray objectAtIndex:1];
CGPoint pointOne = [fingerOne locationInView:[fingerOne view]];
CGPoint pointTwo = [fingerTwo locationInView:[fingerTwo view]];
pointOne = [[CCDirector sharedDirector] convertToGL:pointOne];
pointTwo = [[CCDirector sharedDirector] convertToGL:pointTwo];
float distance = sqrt(pow(pointOne.x - pointTwo.x, 2.0) + pow(pointOne.y - pointTwo.y, …Run Code Online (Sandbox Code Playgroud) ios ×2
iphone ×2
arabic ×1
c# ×1
console ×1
custom-font ×1
ios5 ×1
ipad ×1
objective-c ×1
uifont ×1