如何显示卷曲的对话/鞭尾计?

时间:2016-04-24 13:57:25

标签: linux shell dialog whiptail

我想使用var containerView: UIView! var tov_datum = [String]() var datum_view: UIView! override func viewDidLoad() { super.viewDidLoad() containerView = UIView() let SCREEN_SIZE = UIScreen.mainScreen().bounds var Y: CGFloat = 0 for index in tov_datum { datum_view = UIView(frame: CGRectMake(0, Y, SCREEN_SIZE.width, 80)) let gradientView = GradientView(frame: datum_view.bounds) datum_view.insertSubview(gradientView, atIndex: 0) let tapGestureRecognizer = UITapGestureRecognizer(target:self, action:"klikk:") datum_view.userInteractionEnabled = true datum_view.addGestureRecognizer(tapGestureRecognizer) containerView.addSubview(datum_view) Y = Y + 80 } let YY = tov_datum.count * 80 NSLayoutConstraint(item: vetítésekView, attribute: .Height, relatedBy: .Equal, toItem: nil, attribute:.NotAnAttribute, multiplier: 1.0, constant:CGFloat(YY)).active = true vetítésekView.addSubview(containerView) } func klikk(recognizer: UITapGestureRecognizer) { print("BOOOOYAAAA") } / curl dialog框显示whiptail的进度条,如:

--gauge

我找到了curl -#OL https://website/myfile 2>&1 | \ ??? stdbuf -o0 awk '???' ? | \ | whiptail --gauge "Downloading the file..." 6 64 0 here的解决方案,这非常好,但我仍然在寻找wget的解决方案。我也试过使用this,但没有成功。

有人知道如何为curl执行dialog / whiptail --gauge进度条吗?

0 个答案:

没有答案