Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Bank code
- - (IBAction)deposit:(id)sender {
- int depositAmount = depositField.intValue;
- if (depositField.intValue > moneyLabel.intValue) {
- [depositField setStringValue:@"Insufficient funds!"];
- }
- else if (depositField.intValue <= moneyLabel.intValue) {
- [depositField setStringValue:@"Success!"];
- balanceLabel.stringValue = [NSString stringWithFormat:@"%d", [depositField intValue]+depositAmount]; // Deposits
- int FinalTotal = moneyLabel.intValue - depositAmount;
- moneyLabel.stringValue = [NSString stringWithFormat:@"%d", [depositField intValue]+FinalTotal]; // Transacts from deposit $
- }
- }
Add Comment
Please, Sign In to add comment