Calculator that displays entire equation [closed] - ios

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
In my application I have created a number pad that also has operators such as + - x /. All I want to know how to do is display these in a label when the user inputs them. For example if the user wanted to know 3 + 5, the user would push the button for each and the label would show 3 + 5 and then the user would push calculate and the answer would display in another label. So basically how do I display that all together in one label? I have been trying to do this a few different ways but it is just giving me a headache.

Track the user input by appending the operations to an NSArray. If the user taps the '+' button, add an NSString to the array of #"+", if they tap on "-", add an #"-" to the array. From here you can generate an concatenated NSString of all the operations to generate the equation.
Furthermore, as the operations are all stored in an NSArray, if the user taps the delete button, you just have to remove the last string from the array and regenerate the equation rather than have to perform string comparisons and manipulation to remove the operation.

Related

How can I automatically press a button on the keyboard when it pops up? For example the letter "A" [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 10 months ago.
Improve this question
I want the letter "A" to get pressed on the keyboard without the user pressing it manually.
Or the "return" button.
You should first think of the basic flow of how the app should work.
Do you want the A to be pressed after x amount of time? Create a counter.
Do you want it after x item appears? Use .onAppear {}
Do you want it after x data refreshes? Use .onChange..
Think about the flow of the app then use the right tool to trigger it.

How to make expandable (stretchable) action for cell as in mail app iOS9 Swift/obj-C [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
Want to make, for example 3 actions for cell ("More", "Flag", "Delete"), and last must activate, if:
1) after opening action list, swipe the cell again in the same direction
2) when opening the action list by swipe, but swipe is continued
image after first swipe,
image of second swipe pointer is near of the left screen edge
So, the only one way to do it as i wish, is to do it by my self or use third party solutions, as mentioned #Louis Tur or this solution. But the best way for now for me is to make it by my self, cause it very specified task. Apple does`t even provide possibility to insert a logo in action (solution with pattern image is not considered)

iOS Secure Text Input For UITextfield [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
im making a Lib for online payment, which will be plugged in merchant's apps, in my Lib have a popup view with Textfield which letting the user to input their PIN code in it
As i think the merchant can write something to get the inputted key in their app in background when my view is show, so i would like to know if thats possible and how to prevent something like that?
Prevent something like capturing keyboard event without needing of textfield delegate like in click here or click here
Thanks
You can make it difficult for the hosting app, but you will never be able to make it impossible to read the PIN. To make it difficult, you will need to create your own PIN entry with its own "keyboard" possibly similar to the PIN entry for the iOS lock screen.
I would avoid using a keyboard, as users can insert their own keyboard, and thus wouldn't use any of the standard text entry fields. It shouldn't be too hard to create a matrix of 11 buttons (0-9 and a backspace) and the code to display it.

How to make a quiz in Delphi? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
I have to make a quiz in school, but I have a problem changing the questions and answers as the user clicks on the button which sends them to next question.
I tried using Case to change the questions as they click the button, but it doesn't seem to work.
So now i don't even know how to start the program.
I have:
Label - This changes into next question when the user clicks on the button.
RadioGroup - This holds up answers to the questions, this needs to change too.
Button - When user clicks on the button, RadioGroup and Label changes.
So what should I write to make sure that the questions changes when users clicks on the button?
Thanks.
The structure of the code inside Onclick() may look like this:
// (1) Save the response selected
...
// (2) Increment counter
Inc(ActualQuestion);
//..
// (3) Get the next Question/Responses
GetQuestion(ActualQuestion);
(1) and (3) will depend on how you have stored the questions and answers.
You can get from a DataBase, File on disk, array in memory...

How to change displayed buttons based on preferences [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I have to use 13 Preferences in my application.
I have 13 buttons for these 13 preferences.
But i need to display only 4 buttons in active on the home screen, which we have select 4 from these 13 preferences
when i click on the preference button (top -right corner to the home page).
preference list will displayed with 13 preferences.
When i select any preference the corresponding button should be replaced with the previous button.
what to do? thanks in advance
Well you need to follow the next:
[if its a limited number of buttons]
1-. Create a IBOutlet for each button.
2-. Maintain a an array for the preferences
3-. Implement an NSNotification in the main screen and call it from preferences, when you dismiss, and send the array
4-. Modify the UIButton
[if its different number of buttons]
- It's almost the same but you need to create them in the code, and then place them. Keep track of the last button x,y,width,height. And the other button could be oldX+oldWidth+offsetX
If you have any problems with the code just tell me

Resources