小编tha*_*nqa的帖子

PHP CodeSniffer include_once错误

我正在尝试在OS X Mountain Lion上安装PHP CodeSniffer - 我似乎遇到了一个奇怪的问题

运行'phpcs'时出现以下错误:

PHP Warning:  include_once(PHP/CodeSniffer/CLI.php): failed to open stream: No such
file or directory in /usr/lib/php/pear/bin/phpcs on line 31

PHP Warning:  include_once(): Failed opening 'PHP/CodeSniffer/CLI.php' for inclusion
(include_path='.;/usr/lib/php/pear/share/pear/') in /usr/lib/php/pear/bin/phpcs on line 31

PHP Fatal error:  Class 'PHP_CodeSniffer_CLI' not found in /usr/lib/php/pear/bin/phpcs
on line 34
Run Code Online (Sandbox Code Playgroud)

文件/usr/lib/php/pear/share/pear/PHP/CodeSniffer/CLI.php存在,令我困惑

php macos codesniffer

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

UIRefreshControl:刷新UITableView'卡住'

我在实现UIRefreshControl时遇到问题 - 因为当你下拉时,'blob'工作得非常好并且刷新微调器工作正常,但是tableView在刷新时不会向上滚动到微调器.相反,它会保持原样,直到刷新完成,此时它将返回到屏幕顶部

刷新的代码是:

- (void)viewDidLoad {
    self.refreshControl = [[UIRefreshControl alloc] init];
    [self.refreshControl addTarget:self action:@selector(refreshView:)forControlEvents:UIControlEventValueChanged];
}

- (void)refreshView:(UIRefreshControl *)refresh  {
    dispatch_async(dispatch_get_main_queue(), ^{
        (...code to get new data here...)
        [self.refreshControl endRefreshing];
    }
}
Run Code Online (Sandbox Code Playgroud)

我发现没有dispatch_async,即使刷新微调器也不起作用 - 并且下拉的位看起来只是白色

有没有人有任何线索我可能做错了什么?我发现的所有实现示例似乎都与我正在做的相匹配,我在API文档中找不到任何表明我遗漏了任何内容的内容

objective-c ios uirefreshcontrol

5
推荐指数
1
解决办法
5651
查看次数

标签 统计

codesniffer ×1

ios ×1

macos ×1

objective-c ×1

php ×1

uirefreshcontrol ×1