0

Can I control the size and position of the text filed of the uisearchbar?and how?

SamehDos
  • 1,183
  • 1
  • 10
  • 23

1 Answers1

0

I think this question has the answer you're looking for, Change the font size of UISearchBar,

for(int i =0; i<[searchbar.subviews count]; i++) {
    if([[searchbar.subviews objectAtIndex:i] isKindOfClass:[UITextField class]])
        [(UITextField*)[searchbar.subviews objectAtIndex:i]setFrame:CGRectMake(0, 0, 50, 50)]];
}

As you can see, just use setFrame instead setFont.

I guess it should work !

Good Luck !

Community
  • 1
  • 1
Alaa Eldin
  • 2,178
  • 4
  • 21
  • 24