日志

解决一个好久的布局问题

发表于 2025-04-17 zhangxinwei

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之后可以了

标签:ios
加入收藏

会员评论登录

评论


关于汉字公式

回到首页

后台数据库查询耗时: 2569 微秒

@2015-2023 最精简的解释,来自于自然、来自于生活

豫ICP备2023033703号-1