纳入细微的龙手机的语音套件时,架构armv7的未定义符号

我将我的应用程序与naunce dragon mobile的speechkit集成在一起,运行时出现错误: Undefined symbols for architecture armv7: "_kCFStreamPropertySSLPeerCertificates", referenced from: l469 in SpeechKit(libSpeechKit.a-armv7-master.o) l642 in SpeechKit(libSpeechKit.a-armv7-master.o) l643 in SpeechKit(libSpeechKit.a-armv7-master.o) "_kCFStreamSSLValidatesCertificateChain", referenced from: l469 in SpeechKit(libSpeechKit.a-armv7-master.o) "_kCFStreamSSLAllowsAnyRoot", referenced from: l469 in SpeechKit(libSpeechKit.a-armv7-master.o) "_OBJC_CLASS_$_AVAudioPlayer", referenced from: objc-class-ref in SpeechKit(libSpeechKit.a-armv7-master.o) "_kCFStreamSSLPeerName", referenced from: l469 in SpeechKit(libSpeechKit.a-armv7-master.o) "_kCFStreamSSLAllowsExpiredRoots", referenced from: l469 in SpeechKit(libSpeechKit.a-armv7-master.o) "_kCFStreamSSLAllowsExpiredCertificates", referenced from: l469 in […]

MKPolylineRenderer产生锯齿状的,不相等的path

我正在使用iOS 7 MapKit API在显示MKDirectionsRequest生成的path的地图上生成3D相机移动。 path由MKOverlayRenderer渲染,如下所示: -(void)showRoute:(MKDirectionsResponse *)response { for (MKRoute *route in response.routes) { [self.map addOverlay:route.polyline level:MKOverlayLevelAboveRoads]; } } – (MKOverlayRenderer *)mapView:(MKMapView *)mapView rendererForOverlay:(id < MKOverlay >)overlay { MKPolylineRenderer *renderer = [[MKPolylineRenderer alloc] initWithOverlay:overlay]; UIColor *mapOverlayColor = [UIColor colorWithRed:((float)22 / 255.0f) green:((float)126 / 255.0f) blue:((float)251 / 255.0f) alpha:0.8]; renderer.strokeColor = mapOverlayColor; renderer.lineWidth = 13.0; return […]

在AFNetworking成功调用后self.tableView reloadData不工作

我有一个运行类似于本教程的AFHTTPSessionManager组件的类http://www.raywenderlich.com/59255/afnetworking-2-0-tutorial 但是,[self.tableView reloadData]不适合我。 我有这样的经理实施: -(void) refresh{ manager = [[AFHTTPSessionManager…] iniwithBaseURL:…]; [manager Get:… parameters:… success:^(NSURLSessionDataTask *task, id responseObject){ //test success values in responseObject if(test){ //Get table data [self.tableView reloadData]; } } …. } 但是,如果我后来运行[self.tableView reloadData]在一个单独的函数,它工作得很好。 为什么会发生这种情况,而不是如何在教程中?

iOS:错误__connection_block_invoke_2:连接中断

控制台中的Xcode / iOS 8 / AVFoundation相关的错误: error in __connection_block_invoke_2: Connection interrupted 我只是将AVCaptureVideoDataOutput添加到苹果的示例应用程序“AVCamManualUsingtheManualCaptureAPI” 我补充说的是: // CoreImage wants BGRA pixel format NSDictionary *outputSettings = @{ (id)kCVPixelBufferPixelFormatTypeKey : [NSNumber numberWithInteger:kCVPixelFormatType_32BGRA]}; // create and configure video data output AVCaptureVideoDataOutput *videoDataOutput = [[AVCaptureVideoDataOutput alloc] init]; videoDataOutput.videoSettings = outputSettings; videoDataOutput.alwaysDiscardsLateVideoFrames = YES; [videoDataOutput setSampleBufferDelegate:self queue:sessionQueue]; 上面的代码插入到示例项目中: – (void)viewDidLoad { [super viewDidLoad]; […]

UIDatePicker截断文本并不显示天

我的应用程序突然无法正确显示UIDatePickers。 我正在使用故事板。 Datepickers设置为只显示date。 他们正在切断月份,甚至没有显示日子。 中间有一个很大的空间。 我已经尝试清理项目,重置模拟器,检查本地化设置,并检查是否设置了dynamictypes的大小。 我正在使用Xcode 5.1.1,但在Xcode 6的testing版中发生同样的事情。任何build议,将不胜感激。

在高度达到8192.0之后,UITextView文本变得不可见

我有一个不可滚动的UITextViewembedded在UIScrollView并dynamic地添加文本到UITextView 。 UIScrollView根据TextView的框架相应地调整它的contentSize。 但是,一旦UITextView超过8192的高度,文本将变得不可见(但仍然存在,因为您可以使用放大镜突出显示文本,甚至可以通过放大镜查看文本的部分内容)。 CGRect textviewFrame = self.TextView.frame; textviewFrame.size.height = [self textViewHeightForAttributedText:self.TextView.attributedText andWidth:320.0]; self.TextView.frame = textviewFrame; self.ScrollView.contentSize = self.TextView.frame.size; 帮助函数相应地调整UITextView大小: – (CGFloat)textViewHeightForAttributedText:(NSAttributedString *)text andWidth:(CGFloat)width { UITextView *textView = [[UITextView alloc] init]; [textView setAttributedText:text]; CGSize size = [textView sizeThatFits:CGSizeMake(width, FLT_MAX)]; return size.height; } 没有意识到这是同样的确切的问题,这是没有解决,直到我明确地testing了最大的大小8193和问题发生(而最大尺寸8192仍然有文字显示正确)。 任何人遇到这个问题之前,知道工作? 谢谢

Apple Swift 3&Xcode 9 GM的Mach-O Linker(ld)错误组

这是运行良好,直到通用Xcode(和iOS 11)。 现在我得到这些错误: Apple Mach-O Linker (ld) Error Group "__T0So20AVCapturePhotoOutputC12AVFoundation01_abC16SwiftNativeTypesACWP", referenced from: xxxxxxxxxx "__T012AVFoundation37_AVCapturePhotoOutputSwiftNativeTypesPAAE012availableRawc11PixelFormatG0SaySo8NSNumberCGfg", referenced from: xxxxxxxxx " "__T0So22AVCapturePhotoSettingsC12AVFoundation01_abC16SwiftNativeTypesACWP", referenced from: xxxxxxxxxx ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation) 它指向的一些行是: photoSettings = AVCapturePhotoSettings(rawPixelFormatType: OSType(self.photoOutput.availableRawPhotoPixelFormatTypes.first!)) photoSettings.previewPhotoFormat = [kCVPixelBufferPixelFormatTypeKey as String: photoSettings.availablePreviewPhotoPixelFormatTypes.first!.uint32Value, kCVPixelBufferWidthKey […]

UIImageJPEGRepresentation返回nil

我使用CIFilters将图像转换为灰度并应用一些image processing效果。 在UIImageView中显示输出结果 图像显示并已按预期进行了修改。 但是,调用UIImageJPEGRepresentation似乎每次都不返回任何数据。 它从来没有工作。 调用UIImageJPEGRepresentation使用原始的彩色图像工作正常。 这里发生了什么? 为什么在显示图像时jpeg转换失败可以正常工作? 不会引发任何exception(设置exception断点,没有命中),控制台中不会显示任何消息。 let _cicontext = CIContext(options:nil) // Set up grayscale and blur filters: let grayIze = CIFilter(name: "CIColorControls") let blur = CIFilter(name: "CIGaussianBlur") grayIze.setValue(0, forKey:kCIInputSaturationKey) grayIze.setValue(0.5, forKey: kCIInputBrightnessKey) blur.setValue(4, forKey: kCIInputRadiusKey) // Go! let originalImage = CIImage(image: colorImageThatDefinitelyExists) grayIze.setValue(originalImage, forKey: kCIInputImageKey) blur.setValue(grayIze.outputImage, forKey: kCIInputImageKey) let output = […]

如何在自定义大小中显示一个模态视图控制器?

我想用底部的animation呈现一个自定义大小的模式视图控制器。 我可以使用ModalPresentationStyle实现这个animation到FormSheet ,但是它迫使我使用540×620的默认尺寸,而且我的视图不适合。 我该如何做一个类似的过渡到一个任意大小的视图(控制器)放置在屏幕的中心?

使用UpdateChildValues从Firebase中删除

我正尝试同时从Firebase数据库中的多个位置删除数据。 Firebase文档陈述: “删除数据最简单的方法就是调用removeValue对数据位置的引用,也可以通过指定nil作为另一个写操作的值来删除,比如setValue或updateChildValues,可以用updateChildValues多个孩子在一个单一的API调用“。 我的代码是 let childUpdates = [path1 : nil, path2 : nil, path3 : nil, path4 : nil] ref.updateChildValues(childUpdates) 所有四个path是string,但我得到一个错误: “expression的types是不明确的,没有更多的上下文。” 我会假设这是因为nil值,因为如果我用其他任何东西(如Int)replace零,错误消失。 使用updateChildValues从Firebase中删除数据的正确方法是什么? 我们希望它以与Firebase中的removeValue()函数类似的方式工作。 我们宁愿这样做的原因是因为它可以在一个通话中从多个地方删除。