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 9 years ago.
Improve this question
I have a custom UITableViewCell and cell have 5 label like
Name : ram
DOB : 10/12/2012
Email:ram#gmail.com
Phone :1234567890
Address : Bangalore
In the ViewController I'm showing one popup so that user can select what field he want to see in the table view. So how to achieve this while user can also select these fields randomly than there will be space in between two fields , how to handle all these any suggestion ?
You have a maximum of 5 possible items to display.
Say the user taps on the button to display the popup, and choose to display 3 of the 5 items.
You could then simply create 3 labels, add them to the cells contentView, and change the height for that cell depending on the total height of the displayed labels.
Related
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 4 years ago.
Improve this question
How can I make a UITextField look like the number 4.5 in the following picture:
Simply change the textfield border style like so, this way, you will have invisible borders and just put the textfield in your cell:
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 4 years ago.
Improve this question
When entering more than 2 characters, the text field is no longer centered, only after have finished typing will text become centered in the text field. How can I continuously make the text centered?
While typing in text field
After finished typing in text field
you need to set the text alignment to Center using StoryBoard:
This will make your text to be center forcefully:
You can also set in progrmmatically
textField.textAlignment = .center
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 5 years ago.
Improve this question
I am trying to build a form for a friend. I've tried doing tableviews, but doing so all the sub pages will have different info to fill in. So I wasn't sure if the best way to do this Is by building each page inside form different and not as a tableview. However way I go about this the print button only shows up once all pages have been filled
Questions I have:
Is it difficult to print all three pages info from AirPrint?
What is the best way to build this? Is it still tableviews?
If not using route of tableviews how do I add up the empty text boxes to bring back a percentage bar?
My first page I have set up is a tableview, if that is the way to do that how can I make a separate view for each row?
If you are looking to build a form I would suggest using the library found here: https://github.com/xmartlabs/Eureka. The library includes a lot of different types of fields and validations for different data types.
In order to create an action from selecting a button you can use the onCellSelection callback like this:
+++ Section()
<<< ButtonRow() {
$0.title = "Tap to force form validation"
}
.onCellSelection { cell, row in
//Do something here once the row has been tapped
}
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 5 years ago.
Improve this question
I understand how to change the text of a label by pressing one button. But what I want is to only be able to change the text after pressing two buttons. I have a table with names(all buttons) on the left column and specific stats on the top row(all buttons as well) to keep stats. I want to be able to press the name of a person and certain stats to change that corresponding label.
[I know, the code below is very basic, but I think keeping it as simple as possible helps beginners understanding the basic concepts.]
Create trackers for both buttons that keep track of whether the button has been pressed:
var pressedB1: Bool = false
var pressedB2: Bool = false
Check for the trackers' states in the buttons' actions:
#objc func pressedButton1(button: UIButton) {
pressedB1 = true
if pressedB2 {
//change label's text
}
}
...and the same for the other button.
Improving this code, you could use the buttons' tags, a single function for the buttons' actions, etc.. You could also use the buttons' control states which would also work better UX-wise.
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
I want to create a data grid in GWT. It should have some features like,
sortable headers
automatic scroll bar
custom styling for selected row in the grid.
custom styling for selected cell in the grid.
Then simply create a DataGrid. It has automatic scrollbar, custom styles for selected rows and columns as well as functionality for adding sorting to headers.
For sorting please refer to ListHandler