fixing crashes when clicking camera
This commit is contained in:
parent
7d3318cf70
commit
38e0327bb8
5 changed files with 24 additions and 10 deletions
|
@ -65,7 +65,7 @@
|
|||
UIImage *buttonRightImage = [UIImage imageNamed:@"button-navigation-camera.png"] ;
|
||||
[buttonRight setImage:buttonRightImage forState:UIControlStateNormal];
|
||||
buttonRight.frame = CGRectMake(0, 0, buttonRightImage.size.width, buttonRightImage.size.height);
|
||||
[buttonRight addTarget:self action:@selector(capturePhoto) forControlEvents:UIControlEventTouchUpInside];
|
||||
[buttonRight addTarget:self action:@selector(openCamera:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
UIBarButtonItem *customRightButton = [[UIBarButtonItem alloc] initWithCustomView:buttonRight];
|
||||
self.navigationItem.rightBarButtonItem = customRightButton;
|
||||
|
@ -94,6 +94,10 @@
|
|||
}
|
||||
}
|
||||
|
||||
- (void) openCamera:(id) sender
|
||||
{
|
||||
[(MenuViewController*)self.viewDeckController.leftController openCamera:sender];
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated
|
||||
{
|
||||
|
|
|
@ -48,6 +48,11 @@ static const NSInteger kGANDispatchPeriodSec = 10;
|
|||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
|
||||
{
|
||||
|
||||
#ifdef TEST_FLIGHT_ENABLED
|
||||
// to start the TestFlight SDK
|
||||
[TestFlight takeOff:@"5713cf3e-f49b-4f0d-ba14-88958f16ec08"];
|
||||
#endif
|
||||
|
||||
#ifdef GOOGLE_ANALYTICS_ENABLED
|
||||
// Google Analytics SDK
|
||||
// Initialize Google Analytics
|
||||
|
@ -61,18 +66,13 @@ static const NSInteger kGANDispatchPeriodSec = 10;
|
|||
[TestFlight setDeviceIdentifier:[[UIDevice currentDevice] uniqueIdentifier]];
|
||||
#endif
|
||||
|
||||
#ifdef TEST_FLIGHT_ENABLED
|
||||
// to start the TestFlight SDK
|
||||
[TestFlight takeOff:@"407f45aed7c5bc2fc88cb567078edb1f_MjMyNTUyMDExLTA5LTEyIDEyOjEyOjU3Ljc1Nzg5MA"];
|
||||
#endif
|
||||
|
||||
[self prepareConnectionInformation];
|
||||
|
||||
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
|
||||
// Override point for customization after application launch.
|
||||
self.window.backgroundColor = [UIColor whiteColor];
|
||||
|
||||
self.menuController = [[MenuViewController alloc] initWithNibName:@"MenuViewController" bundle:nil];
|
||||
self.menuController = [[MenuViewController alloc] init];
|
||||
|
||||
HomeTableViewController *centerController = [[HomeTableViewController alloc] init];
|
||||
self.centerController = [[UINavigationController alloc] initWithRootViewController:centerController];
|
||||
|
|
|
@ -66,7 +66,7 @@ const NSInteger kNumberOfCells = 10;
|
|||
UIImage *buttonRightImage = [UIImage imageNamed:@"button-navigation-camera.png"] ;
|
||||
[buttonRight setImage:buttonRightImage forState:UIControlStateNormal];
|
||||
buttonRight.frame = CGRectMake(0, 0, buttonRightImage.size.width, buttonRightImage.size.height);
|
||||
[buttonRight addTarget:self action:@selector(capturePhoto) forControlEvents:UIControlEventTouchUpInside];
|
||||
[buttonRight addTarget:self action:@selector(openCamera:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
UIBarButtonItem *customRightButton = [[UIBarButtonItem alloc] initWithCustomView:buttonRight];
|
||||
self.navigationItem.rightBarButtonItem = customRightButton;
|
||||
|
@ -95,6 +95,11 @@ const NSInteger kNumberOfCells = 10;
|
|||
self.quiltView.backgroundColor = [[UIColor alloc] initWithPatternImage:backgroundImage];
|
||||
}
|
||||
|
||||
- (void) openCamera:(id) sender
|
||||
{
|
||||
[(MenuViewController*)self.viewDeckController.leftController openCamera:sender];
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning
|
||||
{
|
||||
[super didReceiveMemoryWarning];
|
||||
|
|
|
@ -121,7 +121,7 @@
|
|||
UIImage *buttonRightImage = [UIImage imageNamed:@"button-navigation-camera.png"] ;
|
||||
[buttonRight setImage:buttonRightImage forState:UIControlStateNormal];
|
||||
buttonRight.frame = CGRectMake(0, 0, buttonRightImage.size.width, buttonRightImage.size.height);
|
||||
[buttonRight addTarget:self action:@selector(capturePhoto) forControlEvents:UIControlEventTouchUpInside];
|
||||
[buttonRight addTarget:self action:@selector(openCamera:) forControlEvents:UIControlEventTouchUpInside];
|
||||
|
||||
UIBarButtonItem *customRightButton = [[UIBarButtonItem alloc] initWithCustomView:buttonRight];
|
||||
self.navigationItem.rightBarButtonItem = customRightButton;
|
||||
|
@ -136,6 +136,11 @@
|
|||
self.tableView.separatorColor = UIColorFromRGB(0xC8BEA0);
|
||||
}
|
||||
|
||||
- (void) openCamera:(id) sender
|
||||
{
|
||||
[(MenuViewController*)self.viewDeckController.leftController openCamera:sender];
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated
|
||||
{
|
||||
[super viewWillAppear:animated];
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>10.7</string>
|
||||
<string>10.8</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleURLTypes</key>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue