Woodstock
Woodstock

Reputation: 22966

Issue with UISearchBar frame

I have a UITableView which I programatically create and I have added a UISearchBar/UISearchDisplayController as a subview. It looks like this:

enter image description here

That's all fine but when I touch it to invoke searching the frames changes strangely, any idea why?

enter image description here

I've tried manually setting the frame, doesn't seem to help.

The UITableView is a property of a UIViewController.

Upvotes: 2

Views: 151

Answers (1)

E. Rivera
E. Rivera

Reputation: 10938

I think it is a duplicate of this question UIsearchBar. Can't change frame.

The answer being that you can't mess with UISearchBar's frame.

Upvotes: 2

Related Questions