Commit cb05bf88 authored by Alex Moore's avatar Alex Moore

Fixed crash from settings page (maybe?)

parent b4870d5f
{
"images" : [
{
"idiom" : "iphone",
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-Small@2x.png",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "29x29",
"idiom" : "iphone",
"filename" : "Icon-Small@3x.png",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-40@2x.png",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "40x40",
"idiom" : "iphone",
"filename" : "Icon-40@3x.png",
"scale" : "3x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-60@2x.png",
"scale" : "2x"
},
{
"idiom" : "iphone",
"size" : "60x60",
"idiom" : "iphone",
"filename" : "Icon-60@3x.png",
"scale" : "3x"
},
{
......
......@@ -19,7 +19,10 @@
// Do any additional setup after loading the view.
[self.view addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self.view action:@selector(endEditing:)]];
self.navigationItem.hidesBackButton = YES;
}
- (void)viewDidAppear:(BOOL)animated {
[super viewDidAppear:animated];
[self resetRTI];
}
......@@ -83,14 +86,15 @@
return (UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown);
}
-(IBAction)unwindFromSection:(UIStoryboardSegue *)sender {
}
-(IBAction)unwind:(UIStoryboardSegue *)sender {
//reset UIWebView here
[self resetRTI];
-(IBAction)unwindFromScan:(UIStoryboardSegue *)sender {
}
-(void) resetRTI {
//Reset global uiwebview
GlobalWebController *globalWeb = [GlobalWebController resetInstance];
......
This diff is collapsed.
......@@ -9,6 +9,7 @@
#import <UIKit/UIKit.h>
#import "Session.h"
#import "CaptuvoScannerController.h"
#import "LogInViewController.h"
@interface ScanBookViewController : CaptuvoScannerController<UITableViewDataSource, UITableViewDelegate>
......
......@@ -295,9 +295,6 @@ static int BOOK_ID_LENGTH = 14;
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
......
......@@ -265,11 +265,13 @@
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
if ([segue.identifier isEqualToString:@"segueToScanning"]) {
NSIndexPath *path = [self.tableView indexPathForSelectedRow];
Session *session = [[Session alloc] init];
session.section = [self.sections objectAtIndex:path.row];
ScanBookViewController *destViewController = [segue destinationViewController];
destViewController.session = session;
}
}
......
......@@ -82,7 +82,9 @@
break;
}
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;
}
case BatteryStatusUndefined: {
......@@ -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
......
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