ServoTab_Interfacepyramid
Last change
on this file since 4a56cfb was
d31bab4,
checked in by Steve Castellotti <sc@…>, 9 years ago
|
Tab Bar:
|
-
Property mode set to
100644
|
File size:
1.6 KB
|
Line | |
---|
1 | |
---|
2 | |
---|
3 | |
---|
4 | |
---|
5 | |
---|
6 | |
---|
7 | |
---|
8 | |
---|
9 | #import "SupportViewController.h" |
---|
10 | |
---|
11 | @implementation SupportViewController |
---|
12 | |
---|
13 | @synthesize webView, retryButton, status; |
---|
14 | |
---|
15 | - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil |
---|
16 | { |
---|
17 | self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; |
---|
18 | if (self) { |
---|
19 | |
---|
20 | } |
---|
21 | return self; |
---|
22 | } |
---|
23 | |
---|
24 | - (void)viewDidLoad |
---|
25 | { |
---|
26 | [super viewDidLoad]; |
---|
27 | [self loadSupportSite]; |
---|
28 | } |
---|
29 | |
---|
30 | - (void) loadSupportSite |
---|
31 | { |
---|
32 | |
---|
33 | [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString: @"http://orbit.puzzlebox.info/contact"]]]; |
---|
34 | } |
---|
35 | |
---|
36 | #pragma mark UIWebViewDelegate methods |
---|
37 | |
---|
38 | - (void)webViewDidFinishLoad:(UIWebView *)webView |
---|
39 | { |
---|
40 | retryButton.hidden = YES; |
---|
41 | status.hidden = YES; |
---|
42 | } |
---|
43 | |
---|
44 | - (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error |
---|
45 | { |
---|
46 | UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Not Connected" message:@"Unable to view support since you have no internet connection" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; |
---|
47 | [alert show]; |
---|
48 | retryButton.hidden = NO; |
---|
49 | status.hidden = NO; |
---|
50 | status.text = @"Unable to load support site"; |
---|
51 | } |
---|
52 | |
---|
53 | #pragma mark button press methods |
---|
54 | |
---|
55 | - (IBAction) retryButtonPressed:(id) sender { |
---|
56 | retryButton.hidden = YES; |
---|
57 | status.text = @"Loading support website..."; |
---|
58 | [self loadSupportSite]; |
---|
59 | } |
---|
60 | |
---|
61 | @end |
---|
Note: See
TracBrowser
for help on using the repository browser.