Tag: ios8

属性不可用:8.0版本之前的iOS版本的第一个基线布局属性

我在XCode 6.1中收到以下警告 。 属性不可用:8.0版本之前的iOS版本的第一个基线布局属性 我想,这也导致我的iOS 7.x版本崩溃 。

iOS 8.0 – “未能及时更新场景”崩溃

我在iOS 8.0上运行时遇到以下崩溃。 这是我第一次看到这个,所以任何观察都会有帮助: Incident Identifier: C39AF13A-D02B-40B1-8FC3-CFED8226D6FA CrashReporter Key: dace0b0fe53a1661c59ffa598b3a139a6177d713 Hardware Model: iPhone7,2 Process: Vieu [435] Path: /private/var/mobile/Containers/Bundle/Application/36CE6BFB-F90E-452B-8A4F-2B352F95DE48/Vieu.app/Vieu Identifier: com.vieu.mobile Version: 140929 (1.0) Code Type: ARM-64 (Native) Parent Process: launchd [1] Date/Time: 2014-09-29 17:12:47.878 -0700 Launch Time: 2014-09-29 15:39:55.349 -0700 OS Version: iOS 8.0.2 (12A405) Report Version: 105 Exception Type: 00000020 Exception Codes: 0x000000008badf00d Highlighted Thread: […]

开发者在Apple Watch上使用“Taptic Engine”

根据苹果有关iOS 8.2和Xcode 6.2的发布信息,他们提到开发者可以使用苹果手表提供的新技术: 借助iOS 8.2 beta SDK,开发人员现在可以开始使用WatchKit创build突破性的新应用程序,概览和可操作的通知,这些通知专为创新的Apple Watch界面devise,并与Force Touch,Digital Crown和Taptic Engine等新技术配合使用 。 在梳理WatchKit框架文档后,我没有发现使用Taptic引擎。 有开发人员使用它的方法吗? 也许他们还没有实现,可能会在iOS 8.2以后的更新,但我不认为这是事实。 我错过了什么?

如何拦截在AVPlayerViewController中完成button的点击?

我在自定义的UIViewController的viewDidAppear方法中创build了一个AVPlayerViewController和一个附加的AVPlayer 。 但是,当我按下“完成”button,我的自定义视图控制器被自动解雇。 我想拦截这个动作,以便使用我自己的解除Segue,但我不知道如何做到这一点。 我find了MPMoviePlayerViewController例子,但不是AVPlayerViewController 。 我为MPMoviePlayerViewControllerfind的代码如下: – (void)playVideo:(NSString *)aVideoUrl { // Initialize the movie player view controller with a video URL string MPMoviePlayerViewController *playerVC = [[[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:aVideoUrl]] autorelease]; // Remove the movie player view controller from the "playback did finish" notification observers [[NSNotificationCenter defaultCenter] removeObserver:playerVC name:MPMoviePlayerPlaybackDidFinishNotification object:playerVC.moviePlayer]; // Register this class as […]

对于某些单元格,UITableView在iOS8的错误位置显示分隔符

我们有一个UITableView,它工作正常的iOS7,但是当我尝试在iOS8模拟器,我看到单元格分隔符被错误地放置大多数单元格。 奇怪的是,一些单元格正确显示分隔符。 见附图: 我这样设置单元格的高度: – (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 70.0f; } 你知道发生了什么? 谢谢! 编辑: 我正在使用的解决方法是禁用分隔符… [tableView setSeparatorStyle:UITableViewCellSeparatorStyleNone]; …并在单元格视图中自己绘制… UIView* separator = [[UIView alloc] initWithFrame:CGRectMake(20, cellHeight-1, frame.size.width – 40, 1)]; separator.layer.borderWidth = 1; separator.layer.borderColor = [[UIColor grayColor] CGColor]; [self addSubview:separator]; …但我不想这样做。

用Swift和Xcode 6inheritanceUIGestureRecognizer – 如何导入UIGestureRecognizerSubclass.h?

除非您按照此处所述导入UIGestureRecognizerSubclass.h ,否则self.state在子类中写入self.state 。 在Swift环境中,我很困惑如何导入它。 我尝试import UIGestureRecognizerSubclass.h ,没有.h ,但我仍然无法写入self.state 。 我将如何做到这一点?

启动图像或启动xib / storyboard?

我试图完成我的第一个iOS应用程序提交,我只是在这里变得非常困惑。 该文件告诉我,我需要一个启动图像,给我的尺寸为iPhone 6和6+,但很明显在几个地方说:“发射XIB或故事板是需要支持iPhone 6大小的应用程序。 我在这里困惑不已。 如果我需要“启动故事板”,为什么要包含启动图像? 我什至还没有想出发布故事板是什么呢…

添加披露指标时,ios8单元约束被破坏

我有IOS8自动布局的问题,我可以重新创build最简单的情况是一个简单的tableView。 我设置一个静态单元格,然后只需添加一个标签。 我的目标是让标签大量填满空间,所以我对标签有三个限制。 在superview中垂直居中(我认为这很好) 将标签后边距设置为30(相对于超视图) 将标签的前导边距设置为30(相对于超视图) 这一切都非常好,并没有任何重大问题或警告完美的作品(它提醒零高度,但我不认为这是一个问题) 现在…如果我添加一个披露指标,这一切都崩溃了。 它仍然看起来不错,但我得到以下几点: 2014-10-30 15:51:46.358 ContraintIssue[25572:1586028] Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added […]

Swift +macros参数

我读了所有有关macros在Swift问答,而且我确实知道everything in Swift now global,中的everything in Swift now global, 对吗? 而我的实际问题是,如果我有一个macros,我需要parameter passing,那么我怎么能传递它在Swift语言? 例如 Objective-Cmacros #define COLOR_CODE(red, green, blue, alpha) [UIColor colorWithRed: red/255.0 green: green/255.0 blue: blue/255.0 alpha: alpha] 上面的macros是什么Swift语法?

iOS – CoreBluetooth didDiscoverPeripheral没有被调用

我已经在Xcode 6中制作了一个非常简单的iOS应用程序来试用CoreBluetooth并与我的Polar H6心率监视器进行通信。 出于某种原因,didDiscoverPeripheral方法未被调用。 我已经在StackOverflow上发现了以下类似的问题,但是你可能有点不同,或者对我没有回答: corebluetooth-diddiscoverperipheral -不存在所谓的function于迅速 未工作,号召性centralmanager-diddiscoverperipheral-advertisementdata diddiscoverperipheral-代表法-是-不叫 我在viewDidLoad中的代码: NSArray *services = @[[CBUUID UUIDWithString:HRM_HEART_RATE_SERVICE_UUID]]; CBCentralManager *centralManager = [[CBCentralManager alloc] initWithDelegate:self queue:nil]; [centralManager scanForPeripheralsWithServices:services options:nil]; self.centralManager = centralManager; 方法centralManagerDidUpdateState被调用,它告诉我状态等于CBCentralManagerStatePoweredOn 。 didDiscoverPeripheral方法永远不会被调用,即使我把nil传递给scanForPeripheralsWithServices方法。 在app store中,我已经下载了一个名为LightBlue的应用程序。 它是一个非常简单的应用程序来testing任何使用蓝牙4.0 LowEnergy的设备。 它扫描外围设备,并显示有关设备及其服务的详细信息。 LightBlue应用程序看到我的HeartRate显示器,而我自己的小应用程序不.. 有没有人有任何提示或线索如何前进呢? (我正在使用iOS 8的Xcode 6和iPhone 6)