为什么我的班级在swift中找不到?

时间:2015-11-15 06:03:44

标签: ios swift class

enter image description here

RegularLogin.swift发生此错误。我不知道为什么Xcode说使用未声明类型TransmissionProtocol 这是我在TransmissionProtocol.swift

中的代码
import Foundation
import UIKit

var TransmissionProtocolConfiguration = [String: Int]()


public class TransmissionProtocol{

func setUpTransitPorotocol()
{
    /*------------client send to server---------------*/
    //first step
    TransmissionProtocolConfiguration["login"] = 1
    TransmissionProtocolConfiguration["register"] = 2


    /*------------sever send to client-----------------*/

    //login error
    TransmissionProtocolConfiguration["errLoginUsernameNotExist"] = -1
    TransmissionProtocolConfiguration["errLoginUsernameAlreadyOnline"] = -2
    TransmissionProtocolConfiguration["errLoginPassword"] = -3

    //register error
    TransmissionProtocolConfiguration["errRegisterUsernameExist"] = -4




}

}

即使我添加NSObject,它也不起作用: enter image description here

enter image description here

0 个答案:

没有答案