Last active
November 10, 2015 11:29
-
-
Save eofster/134d5f79ea6e0efdef8c to your computer and use it in GitHub Desktop.
Pyramid of Doom when accessing first call of an account with identifier
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func hangUpFirstCallOnAccountWithIdentifier(identifier: Int) { | |
if let account = accountRegistry.accountWithIdentifier(identifier) { | |
if let call = account.firstCall { | |
call.hangUp() | |
} else { | |
print("Could not find first call for an account") | |
} | |
} else { | |
print("Could not find account") | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment