Tag: ios7

Memcpy只会在iPhone 5s上崩溃

所有, 我正面临iPhone 5s的一个奇怪的问题。 我正在使用第三方库在我的应用程序中进行HMAC-SHA1encryption。 该库使用memcpy ,我不知道它是什么,因为我没有在C太多的内存级编程。 encryption工作完全正常,除了64 bit 5s所有手机。 下面是它崩溃的代码(5th line) 。 void SHA1Update(SHA1_CTX* context, unsigned char* data, unsigned int len) { unsigned int i, j; j = (context->count[0] >> 3) & 63; if ((context->count[0] += len << 3) < (len << 3)) context->count[1]++; context->count[1] += (len >> 29); if ((j + len) > 63) […]

如何用swift激活操作表button?

我正在寻找一种方法来链接用户操作工作表的button 我做了删除button的function,但我需要的报告button,使用户能够发送电子邮件,如何做到这一点迅速? 谢谢 override func tableView(tableView: UITableView,editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [AnyObject]? { var ReportAction = UITableViewRowAction(style: .Default, title: "Report User", handler: {(action: UITableViewRowAction! , indexPath:NSIndexPath!) -> Void in let ReportMenu = UIAlertController(title: nil, message: "Report using", preferredStyle: UIAlertControllerStyle.ActionSheet) let Reportbutton = UIAlertAction(title: "E-Mail", style: .Default , handler: nil) ReportMenu.addAction(Reportbutton) self.presentViewController(ReportMenu, animated: true, completion: nil) }) […]

ios编程调用,而不必退出应用程序

有没有任何方式来编程调用,而无需退出当前的应用程序? 我做了一个研究,但所有的答案都与 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:phoneNumber]]; 这不是我想要的,我也需要访问语音stream。

iOS 7应用程序崩溃EXC_CRASH(SIGABRT)objc_exception_throw在iOS 6上正常工作

我们的应用程序在iOS 7中崩溃,它在iOS 6中工作正常。我们不确定是什么导致了这个问题。 我们可以看到抛出了一些exception,但是我们不确定代码在哪里造成的。 这是崩溃报告: Incident Identifier: 1F589930-15BD-49F7-80E6-831A95092FDF CrashReporter Key: aaa79870161ff1e371394b881a26e97f0066f464 Hardware Model: iPhone5,2 Process: myapp [1492] Path: /var/mobile/Applications/A121DF2F-A7B9-4DD9-9FBC-BB06CD7C5EF5/myapp.app/myapp Identifier: co.uk.myapp Version: 1.0 (0.9) Code Type: ARM (Native) Parent Process: launchd [1] Date/Time: 2013-10-01 14:59:17.555 +0530 OS Version: iOS 7.0 (11A465) Report Version: 104 Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Triggered by Thread: […]

iOS 7 UINavigationBar背景图片隐藏标题视图

我制作了iOS应用程序,其中我希望我的应用程序与iOS 7兼容 我面对的问题是,当我在iOS 7上运行我的应用程序时,我的UINavigationBar背景图像隐藏了我的titleview和back button : -(void)viewDidLoad { [super viewDidLoad]; [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"top.png"] forBarMetrics:UIBarMetricsDefault]; self.title=@"Artist"; self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Back" style:UIBarButtonItemStylePlain target:nil action:nil]; } 另外,当我设置UINavigationBar背景图像为零,它显示titleview和back button 当我在iOS 7之前运行我的应用程序时,它正常工作。 请帮忙。 提前致谢。

Xcode检测iOS版本并相应地显示故事板

我想向iOS6用户显示一个故事板,另一个显示给iOS7用户。 我怎样才能做到这一点?

使用约束来保持两个表视图相同的高度和相同的距离

上下文/我想要做什么 我正在为iOS 7构build这个 我正在使用StoryBoard 我有两个UITableViews ,我想保持相同的高度和距离,以保持3.5和4英寸设备之间的视觉一致性 所以从4英寸的屏幕转换到3.5英寸的屏幕,我想: 桌子视图变短,但保持高度相等 顶层表视图保持相同的y pos 对于底部表格视图来移动它的位置,以保持顶部桌子视图的底部和底部桌子视图的顶部之间的相同距离。 和他们之间的差距一样 我所试过的 在故事板中使用Pin图标我已经select了两个TableView,并将它们的高度设置为相等,并将此代码包含在视图控制器中: [self.topTableView addConstraint:[NSLayoutConstraint constraintWithItem:self.bottomTableView attribute:NSLayoutAttributeBottom relatedBy:0 toItem:self.bottomTableView attribute:NSLayoutAttributeTop multiplier:1 constant:30]]; 题 如何保持相同的高度,同时保持相同的距离 更新

使用AVCaptureMetadataOutput和AVFoundation扫描条形码

我使用AVFoundation和AVCaptureMetadataOutput来扫描iOS7中的QR条形码,我提出了一个视图控制器,允许用户扫描条形码。 它工作正常,即。 正在扫描条形码,我可以输出条形码string到控制台。 但它一遍又一遍的扫描,看屏幕截图。 我想要它做的只是扫描条形码一次,然后dismissViewController。 这是我的委托方法的代码: – (void)captureOutput:(AVCaptureOutput *)captureOutput didOutputMetadataObjects:(NSArray *)metadataObjects fromConnection:(AVCaptureConnection *)connection { CGRect highlightViewRect = CGRectZero; AVMetadataMachineReadableCodeObject *barCodeObject; NSString *detectionString = nil; NSArray *barCodeTypes = @[AVMetadataObjectTypeUPCECode, AVMetadataObjectTypeCode39Code, AVMetadataObjectTypeCode39Mod43Code, AVMetadataObjectTypeEAN13Code, AVMetadataObjectTypeEAN8Code, AVMetadataObjectTypeCode93Code, AVMetadataObjectTypeCode128Code, AVMetadataObjectTypePDF417Code, AVMetadataObjectTypeQRCode, AVMetadataObjectTypeAztecCode]; for (AVMetadataObject *metadata in metadataObjects) { for (NSString *type in barCodeTypes) { if ([metadata.type isEqualToString:type]) { barCodeObject = […]

SSL – 在iOS7中performance有所不同?

我正在研究使用https与服务器通信的iOS企业POS应用程序。 我已经看过在iOS7通用接收SSL错误 – “AddTrust外部CA根”不信任? 和自签名的CA和自签名证书之间的区别 ,一般在网上search,但我没有得到任何地方。 该应用程序使用http或https协议在iOS6.1上正常工作。 它也可以通过HTTP在iOS 7GM上正常工作,但不能通过https – 在发送给服务器的第一条消息时失败。 在应用程序方面,我处理身份validation挑战: – (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge: (NSURLAuthenticationChallenge *)challenge { [challenge.sender useCredential:[NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust] forAuthenticationChallenge:challenge]; } 之后我得到一个callback: – (void)connectionDidFinishLoading:(NSURLConnection *)connection 不: – (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error 我相信这意味着客户端和服务器成功地协商了一个连接,同意一个encryption协议等。不幸的是,虽然返回看起来是成功的(就networking堆栈而言),但是我在AMF有效载荷中取回了0字节的数据。 这里有趣的部分 – 在服务器端(JBoss4.2.3)我可以断点并检查包含AMFRequest的httpRequest体。 通过http,我总是得到384字节的正文。 通过https,如果客户端是iOS 6.1,则获得384个字节,如果客户端是iOS 7,则获得0个字节。我认为,https服务器正常接受https请求,没有错误,安全违规等。 还有一个数据点。 如果我在客户端运行Charles ,则通过使用iOS 7模拟器的https可以正常工作。 我可以在Charles和服务器上看到384字节的AMFRequest。 查尔斯作为一个http代理人 – 但是这个应用程序对此并不知情,那么为什么插入查尔斯作为一个中间人使它工作? 我已经安装了Charles的证书,所以我认为它是通过SSL与服务器通信(不知道肯定)。 感谢您的任何帮助或build议。 更新:我实施了苹果推荐的方法: – (void)connection: […]

我在哪里可以findiOS 7的默认后退buttonV形图像?

我正在更新使用UIButtons的旧应用程序,这些应用程序的目的是模仿导航栏的后退button。 我想使用iOS 7中用于后退button的默认V形图像。 这个图像在iOS 7 SDK或其他地方的某处可用,所以我可以通过setImage:forState:将它用作UIButton的图像setImage:forState: