source: orbit/iOS/Orbit/Orbit/controllers/SupportViewController.m @ ce0a7ee

RawEEGServoTab_Interfacepyramid
Last change on this file since ce0a7ee was ce0a7ee, checked in by Jonathon Horsman <jonathon@…>, 7 years ago

Port Android AudioService? to iOS
Dummy page for tutorial
icons for tabs (which don't work)

  • Property mode set to 100644
File size: 1.5 KB
Line 
1//
2//  SupportViewController.m
3//  orbit
4//
5//  Created by Jonathon Horsman on 11/07/2013.
6//  Copyright (c) 2013 Puzzlebox Productions, LLC. All rights reserved.
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        // Custom initialization
20    }
21    return self;
22}
23
24- (void)viewDidLoad
25{
26    [super viewDidLoad];
27    [self loadSupportSite];
28}
29
30- (void) loadSupportSite
31{
32    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString: @"http://puzzlebox.info/forums/forumdisplay.php?fid=4"]]];
33}
34
35#pragma mark UIWebViewDelegate methods
36
37- (void)webViewDidFinishLoad:(UIWebView *)webView
38{
39    retryButton.hidden = YES;
40    status.hidden = YES;
41}
42
43- (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error
44{
45    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Not Connected" message:@"Unable to view support since you have no internet connection" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil];
46    [alert show];
47    retryButton.hidden = NO;
48    status.hidden = NO;
49    status.text = @"Unable to load support site";
50}
51
52#pragma mark button press methods
53
54- (IBAction) retryButtonPressed:(id) sender {
55    retryButton.hidden = YES;
56    status.text = @"Loading support website...";
57    [self loadSupportSite];
58}
59
60@end
Note: See TracBrowser for help on using the repository browser.