小编hna*_*eri的帖子

在 UITableViewCell 上向右滑动

所以我在网站上搜索了这个问题的答案,有一些不错的结果,但最近没有任何结果,因为 Xcode 7 不再是测试版,而 swift 2.0 现在是标准。

我使用了以下代码来实现“向左滑动”功能将导致 UITableViewCell 发生某些情况 -

func tableView(tableView: UITableView, commitEditingStyle editingStyle: UITableViewCellEditingStyle, forRowAtIndexPath indexPath: NSIndexPath){
    if editingStyle == UITableViewCellEditingStyle.Delete {
        // ...
    }
}
Run Code Online (Sandbox Code Playgroud)

据我所知,这是 Apple 现在在其 API 中提供的内容,不需要使用外部类。

我还了解您可以使用此本机代码自定义此滑动所产生的操作:

func tableView(tableView: UITableView, editActionsForRowAtIndexPath indexPath: NSIndexPath) -> [AnyObject]? {
    let more = UITableViewRowAction(style: .Normal, title: "More") { action, index in
    print("more button tapped")
}
Run Code Online (Sandbox Code Playgroud)

是否有任何现代本机代码可以在 UITableViewCell 上定义“右滑动”?

uitableview swipe ios swift

4
推荐指数
1
解决办法
4393
查看次数

Geb - IncompatibleClassChangeError

我刚刚开始使用Geb,并且在从Book of Geb输入示例代码时遇到此错误:

import geb.Browser


Browser.drive {
    go "http://google.com/ncr"

    // make sure we actually got to the page
    assert title == "Google"

    // enter wikipedia into the search field
    $("input", name: "q").value("wikipedia")

    // wait for the change to results page to happen
    // (google updates the page dynamically without a new request)
    waitFor { title.endsWith("Google Search") }

    // is the first link to wikipedia?
    def firstLink = $("li.g", 0).find("a.l")
    assert firstLink.text() == "Wikipedia"

    // click the link
    firstLink.click()

    // wait …
Run Code Online (Sandbox Code Playgroud)

java groovy geb

3
推荐指数
1
解决办法
3564
查看次数

Appium和Android 6.0(棉花糖)

Appium是否支持棉花糖?我正在尝试选择Marshmallow的平台名称,但它似乎不包含它,我安装了最新版本的Appium ....在此输入图像描述

appium android-6.0-marshmallow

2
推荐指数
1
解决办法
2307
查看次数

标签 统计

android-6.0-marshmallow ×1

appium ×1

geb ×1

groovy ×1

ios ×1

java ×1

swift ×1

swipe ×1

uitableview ×1