0

I am new to stackview. Problem I'm facing is with the size of the roundStyled Textfield with image , whose size is correct after stacking. But it is shrinking after running in the simulator and its size is not changing even after the hight and width is varied.

This screenshot shows the size is apt before running,enter image description here

this screen shot shows the simulator, enter image description here

please help me to solve this issue...

trainer
  • 1
  • 1
  • 3

2 Answers2

0

Use this property to set image on text field and give rounded corner on textfield.

textfield.leftViewMode = UITextFieldViewModeAlways;
        textfield.leftView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"image.png"]];
Anil Makhija
  • 45
  • 10
  • we applied the same, but the problem still persists with the size of the textfield after adding image.Not able to adjust the size of the textfiled.... – trainer Dec 21 '15 at 03:56
  • This just sets the image, and doesn't make the textfield rounded. Use the layer.cornerRadius property to make the textfield rounded. – K.K Jun 07 '17 at 07:55
0

Try to put that four circle below enter password in a view and then put that view and enter password label in a stack view.

Before that put that 4 circle in a stack view and place that horizontally in container and vertically in container and given all of them same width and height this will going to work . And for spacing you can use spacing value from inspectors on right side.

Amit Verma
  • 427
  • 4
  • 6