I ve followed a how-to to create a simple Tab bar controller with a navigation controller in the first tab. Until here all is working correctly, expect a strange issue on the layout. When the app starts the first time, the Navigation Bar on the top of the first loaded nib is a little outside of the view. I cannot figure out why this happen. In the first view there is a button "Add new System" that opens a modal view. If I press this button and the modal view appears and then I dismiss the modal going back to the initial view, then the Navigation bar at the top is placed/refreshed correctly. The same happens if I press the second TAB (it s a simple nib without Navigation controller for now) and then back to the first TAB, the Navigation bar is placed in the correct position. Here a screenshot on the first startup:
在这里,我发表模式观点或第二次意向书,然后回到第一种观点:
该法典在网上的众多辅导员之一之后是一成不变的。 I m NOT使用故事板。 只有定制才能在航行律师协会的顶端增加 but子:
UIImage *editbuttonImage = [UIImage imageNamed:@"edit_pressed.png"];
UIButton *editButton = [UIButton buttonWithType:UIButtonTypeCustom];
[editButton setBackgroundImage:editbuttonImage forState:UIControlStateNormal];
editButton.frame = CGRectMake(0, 0, editbuttonImage.size.width, editbuttonImage.size.height);
[editButton addTarget:self action:@selector(leaveEditMode)
forControlEvents:UIControlEventTouchUpInside];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]
initWithCustomView:editButton];
[editButton release];
[editbuttonImage release];
No other modifications were made. The nib was used before in a single view. Then I ve tried to insert it into a TAB Controller + Navigation Controller. I could post the whole code in case it s needed. Under Select System there is a Table View, in these pictures empty, also not shown.
感谢你们的帮助!
页: 1