Ios 如何将UIProgressview添加到Theos应用程序
我想添加一个进度屏幕,当用户按下Install 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
#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按钮时显示一个进度屏幕