Can't edit UITableView frame.y

Have a nib file with a UISearchBar on top and a UITableView.

wann add an button and some text on top of the UISearchBar's input. so i made (in viewWillAppear):

[searchBar setFrame:CGRectMake(0, 0, 320, 90)];

works fine so far (except the position of the input needs to be vertically aligned to the bottom and not to center, any hints on that?).

but the tableView's content is now overlapped with the searchBar. thought i could fix that with:

[self.tableView setFrame:CGRectMake(0, 70, 320, 300)];

this has no effect. (i debugged a little bit around, and it seems i can't edit the origin of the searchBar either).

i can get self.tableView.frame.origin.x (y, width, height). but i cant modify it.

please point me in the right direction. feel a little bit lost on that topic (customizing color, style, alignment, position, size of UI elements).

Answers


You can set the frame components (x, y, width, height) but it's not immediately obvious how to do so. Since the property is for the 'frame' you can only edit the whole frame at once, so here's how to do it:

CGRect newFrame = self.tableView.frame;
newFrame.origin.x = desired_x_value;
self.tableView.frame = newFrame;

Need Your Help

we were unable to access your site's robots.txt file

seo google-webmaster-tools google-crawlers

I verified my site using google webmaster. I have made my website in Wordpress and I also added robots.txt. Now google is showing green tick mark on DNS and Server Connectivity but and yellow warning

Kibana Filtering visualization fields

elasticsearch kibana kibana-4 elastic-stack

I am quite new to Kibana, hoping someone can help me get past an issue I'm having.