ios – xcode 6 beta 4 – MessageComposeResult不能转换为OptionalNilComparisonType

栏目: IOS · 发布时间: 7年前

内容简介:翻译自:https://stackoverflow.com/questions/25099153/xcode-6-beta-4-messagecomposeresult-is-not-convertible-to-optionalnilcompariso
我刚刚从Xcode 6 Beta 3升级到Beta 4.在3我的应用程序完美编译然而在4我有以下错误.任何人都可以解释并提供解决方案.
func messageComposeViewController(sendMsg: MFMessageComposeViewController, didFinishWithResult result: MessageComposeResult) {

    switch result {

    case MessageComposeResultSent :    //Error: MessageComposeResult is not convertible to _OptionalNilComparisonType
        label2.text = "Msg Sent"

    case MessageComposeResultCancelled : //Error: MessageComposeResult is not convertible to _OptionalNilComparisonType
        label2.text = "Msg Send Cancelled"

    case MessageComposeResultFailed :   //Error: MessageComposeResult is not convertible to _OptionalNilComparisonType
        label2.text = "Msg Send Failed"

    default:
        label2.text = "Msg Error"

    }

    self.dismissViewControllerAnimated(true, completion: nil)
    self.reloadInputViews()

}

这是该模块与Swift桥接的方式中的一个错误.报告.要使用该模块,请保持Objective-C直到修复Swift桥接错误.

在我看来,bug的主要部分似乎是:

>这应该是一个枚举,而不是;这是一个结构

> struct有一个值,它应该能够进行比较,但它没有getter(你可以在初始化时设置它但你以后不能得到它)

翻译自:https://stackoverflow.com/questions/25099153/xcode-6-beta-4-messagecomposeresult-is-not-convertible-to-optionalnilcompariso


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

C程序设计题解与上机指导

C程序设计题解与上机指导

谭浩强 / 清华大学 / 2000-9-1 / 19.50元

《C程序设计题解与上机指导(第2版)》是和谭浩强编著的《C程序设计》(第二版)(清华大学出版社1999年出版)配合使用的参考书,内容包括:(1)《程序设计》(第二版)一书的习题和参考解答,包括了该书各章的全部习题,共约150题,对全部编程题都给出了参考解答;(2)上机指南,详细介绍了在当前广泛使用的Turbo C集成环境下编辑、编译、调试和运行程序的方法,并简要介绍了Borland C++的使用方......一起来看看 《C程序设计题解与上机指导》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

MD5 加密
MD5 加密

MD5 加密工具