jjzjj

changeGuestViewController

全部标签

ios - 圈复杂度违规 : Function should have complexity 10 or less: currently complexity equals 13 (cyclomatic_complexity)

我在swift3中有以下代码,我正在使用swiftlint对代码进行linting。给出代码如下:funcselectedMenuInLoggedOutState(sender:UIButton){switchsender.tag{case1:ifletmenu=LeftGuestMenu(rawValue:0){self.changeGuestViewController(menu)}case2:ifletmenu=LeftGuestMenu(rawValue:1){self.changeGuestViewController(menu)}case3:ifletmenu=LeftGu

ios - 圈复杂度违规 : Function should have complexity 10 or less: currently complexity equals 13 (cyclomatic_complexity)

我在swift3中有以下代码,我正在使用swiftlint对代码进行linting。给出代码如下:funcselectedMenuInLoggedOutState(sender:UIButton){switchsender.tag{case1:ifletmenu=LeftGuestMenu(rawValue:0){self.changeGuestViewController(menu)}case2:ifletmenu=LeftGuestMenu(rawValue:1){self.changeGuestViewController(menu)}case3:ifletmenu=LeftGu