ios - 表脚 View 按钮

标签 ios objective-c iphone button footer

我有一些注册表单,其中电子邮件和登录文本字段作为表格单元格,注册按钮作为页脚 View 中的按钮。 所有功能都很棒,这是代码

frame = CGRectMake(boundsX+85, 100, 150, 60);
    UIButton *signInButton = [[UIButton alloc] initWithFrame:frame];
    [signInButton setImage:[UIImage imageNamed:@"button_signin.png"] forState:UIControlStateNormal];
    [signInButton addTarget:self action:@selector(LoginAction) forControlEvents:UIControlEventTouchUpInside];

    self.navigationItem.hidesBackButton = TRUE;
    self.tableView.tableFooterView.userInteractionEnabled = YES;
    self.tableView.tableFooterView = signInButton;
    self.view.backgroundColor = [UIColor blackColor];

我的问题是如何在这个按钮旁边添加另一个按钮。

通过使用 [self.tableView.tableFooterView addSubview:...] 按钮不会显示,如果我使用其他一些 UIView,请将按钮放在那里然后说 footerView 就是那个 UIView,我看到了按钮,但无法显示按下它们。

我希望这不会太令人困惑,并且您能理解我的问题。

最佳答案

关于ios - 表脚 View 按钮,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1866475/

相关文章:

ios - Swift - 在旋转时将 UIImageView 保持在相同位置

ios - 将对象快速存储在用户默认值中

ios - 是否可以将 Metal API 与 OpenGL ES 3.0 同时用于图形计算?

ios - 启动时在 AppDelegate 中将 TabBarViewController 设置为 Root View

iphone - Xcode、SVN 中的源代码控制

ios - 从我的模型文件生成新的 NSManagedObject 子类时,我应该检查 “Use scalar properties for primitive data types” 吗?

iphone - 将测试人员添加到 TestFlight

ios - Xcode4.3 UIActionSheet 导致错误消息

ios - 每次启动更新位置时不显示警报

iphone - 如果免费版本不免费,更新免费应用程序需要付费吗?