subject

In your Main. storyboard Add a
Using stack view, add 17 buttons:
Numbers 0 through 9 (10 buttons)
Decimal point (.) (1 button)
Operations (+, -, *, /) (4 buttons)
Equality sign (=) (1 button)
All clear (AC) to clear the functions/contents in the label (1 button)
In your ViewController. swift file add appropriate outlets and actions to your above created objects.
All the buttons should have appropriate text and action. For example: Numbers should append appropriate number to the label, Equality sign should replace the label content with the result.
Your label must show the entire expression before the result is calculated (i. e. before the equality button is tapped.)
For example: With this sequence of button taps, 1, + and 2, your label must show "1", "1+" and "1+2" for each corresponding button tap. The label must be replaced with "3" when tapped on =.

Change the background color of the label depending on the result
If the result is negative, change the background color of the label to
Since you will be converting the label string into an expression and perform the calculation, you will get errors for improper expressions. Handle that error, set the result in the label to 0 and change the background of the label to
For a calculated non-negative result, the background color of the label should be a default color (same color when the app is launched). The default is usually white, but you can choose any color other than black and
Make sure the text within the label is visible when the background color is changed (i. e. change the text color appropriately if the text is )

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 01:50
Write a program that uses a random number generator to generate a two digit positive integer and allows the user to perform one or more of the following operations: a. double the number. b. reverse the digits of the number. c. raise the number to the power of 2, 3, or 4. d. sum the digits of the number. e. if the number is a two-digit number, then raise the first digit to the power of the second digit. f. if the number is a three-digit number and the last digit is less than or equal to 4, then raise the first two digits to the power of the last digit. after performing an operation if the number is less than 10, add 10 to the number. also, after each operation determine if the number is prime. each successive operation should be performed on the number generated by the last operation. your program should not contain any global variables and each of these operations must be implemented by a separate function. also, your program should be menu driven. 7. (fraction calculator) write a program that
Answers: 1
question
Computers and Technology, 23.06.2019 16:00
Kenny works with an it company. his company is about to launch new software in the market. he has to ensure that this new software is functional and meets all of the quality standards set up at the planning stage. which job profile is kenny likely to have? kenny is likely to have the job profile of a blank .
Answers: 2
question
Computers and Technology, 24.06.2019 23:40
Which slide should you change so it reflects om all sides of your presentation
Answers: 1
question
Computers and Technology, 25.06.2019 05:00
Carmina works at a fast-food restaurant. during the slow afternoon hours, carmina always find projects to keep her busy, like washing all the trays or deep-cleaning the drive-thru area. what workplace habit does carmina show by doing this? efficiency initiative interpersonal skills problem solving
Answers: 1
You know the right answer?
In your Main. storyboard Add a
Using stack view, add 17 buttons:
Numbers 0 through 9 (1...
Questions
question
Mathematics, 25.09.2019 06:00
Questions on the website: 13722363