Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add @objc #152

Open
wants to merge 1 commit into
base: feature_swift_5
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions ShadowsocksX-NG/ServerProfile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ import Cocoa
class ServerProfile: NSObject {
var uuid: String

var serverHost: String = ""
var serverPort: uint16 = 8379
var method:String = "aes-128-cfb"
var password:String = ""
var remark:String = ""
@objc var serverHost: String = ""
@objc var serverPort: uint16 = 8379
@objc var method:String = "aes-128-cfb"
@objc var password:String = ""
@objc var remark:String = ""

var ssrProtocol:String = "origin"
var ssrProtocolParam:String = ""
var ssrObfs:String = "plain"
var ssrObfsParam:String = ""
var ssrGroup: String = ""
@objc var ssrProtocol:String = "origin"
@objc var ssrProtocolParam:String = ""
@objc var ssrObfs:String = "plain"
@objc var ssrObfsParam:String = ""
@objc var ssrGroup: String = ""

var latency:String?

Expand Down
4 changes: 2 additions & 2 deletions ShadowsocksX-NG/StatusItemView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ open class StatusItemView: NSControl {

darkMode = SystemThemeChangeHelper.isCurrentDark()

SystemThemeChangeHelper.addRespond(target: self, selector: #selector(changeMode))
SystemThemeChangeHelper.addRespond(target: self, selector: #selector(_changeMode))
}

required public init?(coder: NSCoder) {
Expand Down Expand Up @@ -105,7 +105,7 @@ open class StatusItemView: NSControl {
}
}

@objc func changeMode() {
@objc func _changeMode() {
darkMode = SystemThemeChangeHelper.isCurrentDark()
setNeedsDisplay()
}
Expand Down
8 changes: 4 additions & 4 deletions ShadowsocksX-NG/Subscribe.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ import Alamofire

class Subscribe: NSObject{

var subscribeFeed = ""
@objc var subscribeFeed = ""
var isActive = true
var maxCount = 0 // -1 is not limited
var groupName = ""
var token = ""
@objc var maxCount = 0 // -1 is not limited
@objc var groupName = ""
@objc var token = ""
var cache = ""

var profileMgr: ServerProfileManager!
Expand Down