Reputation: 55
I'm in need of turning a text field into multiline and store each line as a variable to use in some mathematic equations. Each line will only hold numbers with no decimals. Is this possible with iOS or does anyone have a better suggestion?
Thanks
Upvotes: 0
Views: 100
Reputation: 119041
Separate your concerns, using a text field is suitable for entry but not the listing display. A table view is best for a listing display. Use each UI item where, and how, it's most appropriate.
Upvotes: 2
Reputation: 4980
You cannot have more then one line in a UITextField
. I think what you would be looking for is instead a UITextView
. You can have as many lines as you wish with those. If you're dead-set against a text view, you could do is create multiple text fields and adjust the border style, making them transparent.
Upvotes: 0
Reputation: 16296
It's not possible with UITextField
. Better option is to use multiple UITextField
and set background image for each text field to a custom image to make them appear merged, with a slight border style adjustment, they will appear to user as one component, and then you can manage each line as a separate equation.
Upvotes: 0
Reputation: 65
For more then one line you can't use textfield, better you use UITtextView.
But according to your problem you can take more then one textfield with with no boarder and take any common background image so that you can easily store value of each lines. may b this can solve your problem.
Upvotes: 0