Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/apache-kafka/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 如何将UIProgressview添加到Theos应用程序_Ios_Progress_Theos - Fatal编程技术网

Ios 如何将UIProgressview添加到Theos应用程序

Ios 如何将UIProgressview添加到Theos应用程序,ios,progress,theos,Ios,Progress,Theos,我想添加一个进度屏幕,当用户按下Install Theos按钮时,他们知道发生了什么 这是我的密码: #import "RootViewController.h" #import <UIKit/UIKit.h> @implementation RootViewController - (void)loadView { self.view = [[[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFr

我想添加一个进度屏幕,当用户按下Install Theos按钮时,他们知道发生了什么

这是我的密码:

#import "RootViewController.h"
#import <UIKit/UIKit.h>

@implementation RootViewController
- (void)loadView {
    self.view = [[[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]] autorelease];
    self.view.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"Background"]];

    UIButton *installButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
    installButton.frame = CGRectMake(21, 80, 100, 35);
    [installButton setTitle:@"Install Theos" forState:UIControlStateNormal];
    [self.view addSubview:installButton];
    [installButton addTarget:self action:@selector(installButtonPressed) forControlEvents:UIControlEventTouchUpInside];
}

-(void)installButtonPressed
{
system("apt-get update");
system("apt-get install perl net.howett.theos");
}
@end
#导入“RootViewController.h”
#进口
@RootViewController的实现
-(void)负荷视图{
self.view=[[UIView alloc]initWithFrame:[[UIScreen mainScreen]applicationFrame]]自动释放];
self.view.backgroundColor=[UIColor WithPatternImage:[UIImage ImageName:@“Background”];
UIButton*installButton=[UIButton Button类型:UIButtonyPeroundRect];
installButton.frame=CGRectMake(21,80,100,35);
[installButton设置标题:@“Install Theos”用于状态:UIControlStateNormal];
[self.view addSubview:installButton];
[installButton添加目标:自我操作:@selector(installButton按下)for ControlEvents:UIControlEventTouchUpInside];
}
-(无效)按下InstallButton
{
系统(“apt获取更新”);
系统(“apt get install perl net.howett.theos”);
}
@结束

我还想知道我的背景图像代码是否正确?

您希望进度条显示什么?
apt get install
命令的状态?关于您的背景图像代码,它是否编译和运行,并按预期工作?“正确”是什么意思?是的,apt get安装的进度和应用程序self.view.backgroundColor=[UIColor WithPatternImage:[UIImage ImageName:@“background”];因为当我试图制作软件包时,theos给了我错误2,但没有说明错误是什么,这是不够的信息。如何显示“错误2”?是否没有其他错误或消息?您是否尝试过搜索
apt get
将报告
错误2
的场景?错误2来自Theos,它没有说明是什么。我只想在按下Install Theos按钮时显示一个进度屏幕