Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development > iPhone SDK Development - Advanced Discussion

Reply
 
LinkBack Thread Tools Display Modes
Old 09-28-2009, 02:58 PM   #26 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 3
paulh is on a distinguished road
Default

Quote:
Originally Posted by atomsk47 View Post
Solved it. I had to initialize overlayView with a frame size.
Hmm, I am trying to do the same thing. I have the overlayView initialized with a frame size, but I still cant get the button to respond to touches. Is there something else you did as well?

Code:
UIView *headsUpView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 480, 320)];
		headsUpView.userInteractionEnabled = YES;
		
		
		UIButton *rButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
		rButton.tag = 1;
		rButton.frame = CGRectMake(240, 405, 20, 30);
		[rButton addTarget:self action:@selector(buttonPressed:) forControlEvents:UIControlEventTouchUpInside];
		[headsUpView addSubview:rButton];
paulh is offline   Reply With Quote
Old 09-29-2009, 02:34 AM   #27 (permalink)
Registered Member
 
Join Date: Aug 2009
Posts: 11
pmark is on a distinguished road
Default

Quote:
Originally Posted by paulh View Post
Hmm, I am trying to do the same thing. I have the overlayView initialized with a frame size, but I still cant get the button to respond to touches. Is there something else you did as well?

Code:
UIView *headsUpView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 480, 320)];
Make sure you add the button to the overlay view after calling setCameraOverlayView. For an example, see Examples/FullScreenCameraExampleController.m at master from pmark's Helpful-iPhone-Utilities - GitHub

Also, did you mean to make your headsUpView be landscape?

Last edited by pmark; 09-29-2009 at 02:37 AM.
pmark is offline   Reply With Quote
Old 10-11-2009, 05:15 AM   #28 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 3
paulh is on a distinguished road
Default

Quote:
Originally Posted by pmark View Post
Make sure you add the button to the overlay view after calling setCameraOverlayView. For an example, see Examples/FullScreenCameraExampleController.m at master from pmark's Helpful-iPhone-Utilities - GitHub

Also, did you mean to make your headsUpView be landscape?
belated thanks for the reply, and yep - I want it to be landscape
paulh is offline   Reply With Quote
Old 10-11-2009, 05:54 AM   #29 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 3
paulh is on a distinguished road
Default

Quote:
Originally Posted by pmark View Post
Make sure you add the button to the overlay view after calling setCameraOverlayView.
The button in the overlayView still doesn't work - so I guess I havent understood your advice properly, this is my code now adding the subview with the button after I add the overlay to the camera:

Code:

if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]){
		
		UIView *headsUpView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 480, 320)];
		headsUpView.userInteractionEnabled = YES;
	
		[camera setSourceType:UIImagePickerControllerSourceTypeCamera];
		camera.showsCameraControls = NO;
		camera.navigationBarHidden = YES;
		camera.toolbarHidden = YES;
		camera.wantsFullScreenLayout = YES;
		camera.cameraViewTransform = CGAffineTransformScale(camera.cameraViewTransform, 1.0, 1.13);
		camera.cameraOverlayView = headsUpView;
		[self presentModalViewController:camera animated:YES];
		[self.view bringSubviewToFront:headsUpView];
		
		UIButton *rButton = [[UIButton buttonWithType:UIButtonTypeRoundedRect]retain];
		rButton.tag = 1;
		[rButton setTitle:@"Button" forState:UIControlStateNormal];		
		rButton.frame = CGRectMake(240, 405, 50, 70);
		[rButton addTarget:self action:@selector(buttonPressed:) forControlEvents:UIControlEventTouchUpInside];
		[headsUpView addSubview:rButton];
		
		
	}
paulh is offline   Reply With Quote
Old 01-14-2010, 06:31 AM   #30 (permalink)
Registered Member
 
Join Date: Nov 2009
Posts: 7
xot-dog is on a distinguished road
Default

This example saves photo only with 320*480 screen! How can I save photos with a bigger resolution (1200*1600)?

Thanks in advance.
xot-dog is offline   Reply With Quote
Old 01-14-2010, 09:03 AM   #31 (permalink)
Registered Member
 
DenVog's Avatar
 
Join Date: Jan 2009
Location: Silicon Valley, USA
Posts: 624
DenVog is on a distinguished road
Thumbs up

Quote:
Originally Posted by xot-dog View Post
This example saves photo only with 320*480 screen! How can I save photos with a bigger resolution (1200*1600)?

Thanks in advance.
You might want to check out iPhone Camera Programming Exercises by Norman McEntire. It was very helpful for me, and as I recall shows you specifically how to get the image dimensions from the camera and save the context to the correct size. There is a free viewer for iPhone, so you don't need a Kindle to use it.
DenVog is offline   Reply With Quote
Old 06-03-2010, 09:38 PM   #32 (permalink)
Registered Member
 
Join Date: Jun 2010
Posts: 1
jstaley is on a distinguished road
Default

I've been trying to add a toolbar with a button onto the overlay view which simply allows me to cancel the camera. I can't figure out why I'm unable to actually trigger the button. I have the toolbar set up along with the button, but I cannot seem to click on the button. My feeling is that it is somehow being hidden.

Has anybody added a simple toolbar to the overlay with a UIBarButton, and if so how?
jstaley is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 359
8 members and 351 guests
.Snipe, BSH, givensur, guusleijsten, HemiMG, NSString, Paul Slocum, SillyHoney
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,645
Threads: 94,111
Posts: 402,862
Top Poster: BrianSlick (7,990)
Welcome to our newest member, leighec68
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 05:26 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0