Commit cb05bf88 authored by Alex Moore's avatar Alex Moore

Fixed crash from settings page (maybe?)

parent b4870d5f
{ {
"images" : [ "images" : [
{ {
"idiom" : "iphone",
"size" : "29x29", "size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-Small@2x.png",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"idiom" : "iphone",
"size" : "29x29", "size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-Small@3x.png",
"scale" : "3x" "scale" : "3x"
}, },
{ {
"idiom" : "iphone",
"size" : "40x40", "size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-40@2x.png",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"idiom" : "iphone",
"size" : "40x40", "size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-40@3x.png",
"scale" : "3x" "scale" : "3x"
}, },
{ {
"idiom" : "iphone",
"size" : "60x60", "size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-60@2x.png",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"idiom" : "iphone",
"size" : "60x60", "size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-60@3x.png",
"scale" : "3x" "scale" : "3x"
}, },
{ {
......
...@@ -19,7 +19,10 @@ ...@@ -19,7 +19,10 @@
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
[self.view addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self.view action:@selector(endEditing:)]]; [self.view addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self.view action:@selector(endEditing:)]];
self.navigationItem.hidesBackButton = YES; self.navigationItem.hidesBackButton = YES;
}
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
[self resetRTI]; [self resetRTI];
} }
...@@ -83,14 +86,15 @@ ...@@ -83,14 +86,15 @@
return (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown); return (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown);
} }
-(IBAction)unwindFromSection:(UIStoryboardSegue *)sender {
}
-(IBAction)unwindFromScan:(UIStoryboardSegue *)sender {
-(IBAction)unwind:(UIStoryboardSegue *)sender {
//reset UIWebView here
[self resetRTI];
} }
-(void) resetRTI { -(void) resetRTI {
//Reset global uiwebview //Reset global uiwebview
GlobalWebController *globalWeb = [GlobalWebController resetInstance]; GlobalWebController *globalWeb = [GlobalWebController resetInstance];
......
This diff is collapsed.
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import "Session.h" #import "Session.h"
#import "CaptuvoScannerController.h" #import "CaptuvoScannerController.h"
#import "LogInViewController.h"
@interface ScanBookViewController : CaptuvoScannerController<UITableViewDataSource, UITableViewDelegate> @interface ScanBookViewController : CaptuvoScannerController<UITableViewDataSource, UITableViewDelegate>
......
...@@ -295,9 +295,6 @@ static int BOOK_ID_LENGTH = 14; ...@@ -295,9 +295,6 @@ static int BOOK_ID_LENGTH = 14;
// Get the new view controller using [segue destinationViewController]. // Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller. // Pass the selected object to the new view controller.
} }
......
...@@ -265,11 +265,13 @@ ...@@ -265,11 +265,13 @@
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController]. // Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller. // Pass the selected object to the new view controller.
NSIndexPath *path = [self.tableView indexPathForSelectedRow]; if ([segue.identifier isEqualToString:@"segueToScanning"]) {
Session *session = [[Session alloc] init]; NSIndexPath *path = [self.tableView indexPathForSelectedRow];
session.section = [self.sections objectAtIndex:path.row]; Session *session = [[Session alloc] init];
ScanBookViewController *destViewController = [segue destinationViewController]; session.section = [self.sections objectAtIndex:path.row];
destViewController.session = session; ScanBookViewController *destViewController = [segue destinationViewController];
destViewController.session = session;
}
} }
......
...@@ -82,7 +82,9 @@ ...@@ -82,7 +82,9 @@
break; break;
} }
case BatteryStatusPowerSourceConnected: { case BatteryStatusPowerSourceConnected: {
self.batteryView.image = [UIImage imageNamed:@"battery_charging_100.png"]; ChargeStatus charge_status = [[Captuvo sharedCaptuvoDevice] getChargeStatus];
[self displayChargeStatusIcon:charge_status];
//self.batteryView.image = [UIImage imageNamed:@"battery_charging_100.png"];
break; break;
} }
case BatteryStatusUndefined: { case BatteryStatusUndefined: {
...@@ -92,6 +94,25 @@ ...@@ -92,6 +94,25 @@
} }
} }
-(void) displayChargeStatusIcon:(ChargeStatus)charge_status {
switch (charge_status) {
case ChargeStatusNotCharging:
self.batteryView.image = [UIImage imageNamed:@"battery_charging_000.png"];
break;
case ChargeStatusCharging:
self.batteryView.image = [UIImage imageNamed:@"battery_charging_060.png"];
break;
case ChargeStatusChargeComplete:
self.batteryView.image = [UIImage imageNamed:@"battery_charging_100.png"];
break;
case ChargeStatusUndefined:
self.batteryView.image = [UIImage imageNamed:@"laptop_nobattery_klaptopdaemon.png"];
break;
default:
break;
}
}
#pragma mark - Navigation #pragma mark - Navigation
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment