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, 22.06.2019 17:00
Which of the following is not contained on the slide show toolbar? a. next button b. slide button c. close button d. pen tool
Answers: 1
question
Computers and Technology, 24.06.2019 02:40
Has anyone seen my grandma shes been gone for 4 years already
Answers: 1
question
Computers and Technology, 24.06.2019 12:00
What is a sketch or blueprint of a web page that shows the structure (but not the detailed design) of basic page elements such as the logo, navigation, content, and footer?
Answers: 3
question
Computers and Technology, 24.06.2019 17:00
Anew author is in the process of negotiating a contract for a new romance novel. the publisher is offering three options. in the first option, the author is paid $5,000 upon delivery of the final manuscript and $20,000 when the novel is published. in the second option, the author is paid 12.5% of the net price of the novel for each copy of the novel sold. in the third option, the author is paid 10% of the net price for the first 4,000 copies sold, and 14% of the net price for the copies sold over 4,000. the author has some idea about the number of copies that will be sold and would like to have an estimate of the royal- ties generated under each option. write a program that prompts the author to enter the net price of each copy of the novel and the estimated number of copies that will be sold. the program then outputs he royalties under each option and the best option the author could choose. (use appropriate named constants to store the special values such as royalty rates and fixed royalties.
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