-4
這段代碼是我從朋友處得到的。但我不知道它是如何工作的。我希望這裏有人能幫我解釋這段代碼。因爲這段代碼,我會以我的老師講解很快chek目前modaly或phus,但idont知道什麼?
private func isModal() -> Bool {
if self.presentingViewController != nil {
return true
} else if self.navigationController?.presentingViewController?.presentedViewController == self.navigationController {
return true
} else if self.tabBarController?.presentingViewController is UITabBarController {
return true
}
return false
}
感謝:d
你的朋友複製從http://stackoverflow.com/a/27301207/1187415代碼。 –
要求你的「朋友」向你解釋這段代碼......並告訴我你問他提供給你什麼? – vivek
@MartinR ..是的..這是真的..嗨嗨,但她不是太明智,不適用此代碼:D – user7845351