Tag: 编辑

修改编辑菜单(泡泡popup菜单)的应用之间的链接 – 类似的方式来做到这一点

首先祝大家新年快乐:) 我发现可以修改编辑菜单(复制/粘贴/select等)感谢UIMenuController menuItems。 我想通过此编辑菜单从其他应用程序链接到我的应用程序,例如“复制到我的应用程序”菜单项。 显然,我不能修改其他应用程序的代码,但有没有一种方法呢?

UITableView删除button不出现

当我按编辑button,我得到的项目左侧的圆形删除图标。 当我按下单元格中的删除图标时,它会“变成”,但删除button不显示,所以我的commitEditingStyle永远不会被调用,因为我没有删除button。 只是为了好玩…我改变单元格插入我得到加号图标…我按下它,并调用commitEditingStyle。 我不明白为什么我没有得到删除button。 我有一个UIViewController,我在popup窗口中显示。 我正在添加一个UITableView像这样… audioTable = [[UITableView alloc] initWithFrame:CGRectMake(0, 44, self.view.frame.size.width, 303)]; audioTable.delegate = self; audioTable.dataSource = self; [self.view addSubview:audioTable]; 我正在使用其中有两个标签的自定义单元格来显示文本。 这是自定义单元格initWithFrame … primaryLabel = [[UILabel alloc]initWithFrame:CGRectMake(25 ,8, 275, 25)]; primaryLabel.font = [UIFont systemFontOfSize:14]; secondaryLabel = [[UILabel alloc]initWithFrame:CGRectMake(25 ,28, 275, 25)]; secondaryLabel.font = [UIFont systemFontOfSize:12]; [self.contentView addSubview:primaryLabel]; [self.contentView addSubview:secondaryLabel]; [self.contentView sendSubviewToBack:primaryLabel]; [self.contentView sendSubviewToBack:secondaryLabel]; […]

cameraOverlayView防止编辑与允许编辑

编辑照片后(移动和缩放)在我的应用程序中正常工作: [imagePicker setAllowsEditing:YES]; 但是,如果我也使用cameraOverlayView,编辑模式不再工作。 屏幕出现,但平底锅和捏手势不会使任何事情发生。 我正在使用您的平均图像select控制器: UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init]; 我添加一个相机覆盖视图,从自定义视图控制器的视图创build: CameraOverlayViewController *overlayController = [[CameraOverlayViewController alloc] init]; UIView *overlayView = overlayController.view; [imagePicker setCameraOverlayView:overlayView]; 在IB中,该视图设置为允许用户交互和多点触摸,这允许在拍摄照片时缩放和聚焦。 但一旦拍摄照片并进入编辑模式,您将无法平移或缩小以移动或缩放照片。 我错过了什么?

在View Controller中启用/启用编辑模式

由于UI元素,我创build了一个TableView里面的视图控制器。 但是我无法启用编辑模式。 我尝试了几种不使用Solution的方法。 但是使用TableView控制器没有问题。 我试过的: override func viewDidLoad() { self.navigationItem.rightBarButtonItem = self.editButtonItem() } override func setEditing(editing: Bool, animated: Bool) { super.setEditing(editing, animated: animated) } func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath) { if (editingStyle == UITableViewCellEditingStyle.Delete) { // Action to delete data } } 哪里可以解决问题?

删除ios7中TableView的最后一行时animation问题

我在删除tableView中我(仅)部分的最后一行时遇到了一些问题。 其他任何行都可以正常工作,但是如果我随时删除tableView底部的行(而不是最后一行),则animation非常奇怪而且很缓慢。 它看起来不正确。 我也注意到,改变animationtypes不会做任何事情。 animation总是在行向上滑动并消失的时候。 将其更改为UITableViewRowAnimationFade或其他不做任何事情。 这是我的代码 //For the edit barButtonItem in my storyboard – (IBAction)editButtonPressed:(id)sender { //enter editing mode if ([self.editButton.title isEqualToString:@"Edit"]) { [self setEditing:YES animated:YES]; self.editButton.title = @"Done"; } else { [self setEditing:NO animated:YES]; self.editButton.title = @"Edit"; } } //Editing the tableView. The user can only delete rows, not add any – (UITableViewCellEditingStyle)tableView:(UITableView […]