如何在Theos应用程序中添加UIProgressview

时间:2014-06-28 21:10:46

标签: ios progress theos

我想添加一个进度屏幕,当用户按下安装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

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

0 个答案:

没有答案