解决一个好久的布局问题

implementation CountrySelectionViewController {

    CountryTableAdapter *_adapter;

}


-(void)viewWillAppear:(BOOL)animated {

    [super viewWillAppear:animated];

    self.navigationItem.title = @"";

    self.navigationController.navigationBar.hidden = YES;

    self.navigationItem.hidesBackButton = YES;

}


- (void)viewDidLoad {

    [super viewDidLoad];

    

    self.navigationItem.hidesBackButton = YES;

    self.navigationController.navigationBar.hidden = YES;

    

    self.view.backgroundColor = [UIColor whiteColor];

    

    // 初始化文本框

    self.filterTextField = [[UITextField alloc] initWithFrame:CGRectMake(20, 50, self.view.frame.size.width - 40, 40)];

    self.filterTextField.borderStyle = UITextBorderStyleRoundedRect;

    self.filterTextField.placeholder = @"filter";

    self.filterTextField.delegate = self;

    [self.view addSubview:self.filterTextField];


开始这个模态框的self.filterTextField一直无法点击,今天层级调试发现上面多了一层UINavxxx的东西,加上了上面的 navxx之后可以了

« Back to Home

Comments (0)

No comments yet. Be the first to comment!

Leave a Comment