iphone - 如何在 objective-c 的表格 View 右侧添加加号按钮?

标签 iphone objective-c

我想在表格 View 的右侧添加加号按钮以在其他 View 中添加该单元格的内容。

如何在表格 View 右侧添加加号按钮。

最佳答案

如果你有一个导航栏,你应该像这样添加一个 UIBarButtonItem:

UIBarButtonItem *addButton = [[UIBarButtonItem alloc]      
    initWithBarButtonSystemItem:UIBarButtonSystemItemAdd
    target:self action:@selector(addButtonPressed:)];
self.navigationItem.rightBarButtonItem = addButton;

关于iphone - 如何在 objective-c 的表格 View 右侧添加加号按钮?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2272464/

相关文章:

iphone - iPad动画用什么? SVG?动图?其他?

javascript - iPhone 悬停时的灰色区域

iphone - 从标签栏弹出的图标

ios - AFNetworking 在第一次运行时返回 null

iphone - 如何重置 iPhone 应用程序的钥匙串(keychain)?

objective-c - 具有 ARC 支持的静态库链接到导致链接器错误的非 ARC 项目

iphone - 将静态库添加到 iPhone 项目

iPhone 特定的 CSS

ios - 尽管 "string"为真,但 UIPasteBoard "hasStrings"属性返回 nil

用于测试 HTTP 响应代码和时间的 iOS App