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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 07-26-2010, 06:20 AM   #76 (permalink)
Registered Member
 
Join Date: Dec 2008
Location: UK
Posts: 1,886
Default

Quote:
Originally Posted by ajitha99999 View Post
EDIT.
edit is ueses in the all windows like 2003.etc.
phe90xis.
What!?
harrytheshark is offline   Reply With Quote
Old 07-29-2010, 07:08 AM   #77 (permalink)
Registered Member
 
Join Date: Jun 2009
Posts: 131
Default

Hey guys, my app just got approved :]

do any of you have an iPhone 4 and live in the U.S? could one of you video recored my app in use please? let me know and ill private message you a promo code. thanks
eski is offline   Reply With Quote
Old 07-29-2010, 06:30 PM   #78 (permalink)
Registered Member
 
Join Date: May 2010
Posts: 16
Default

See my post here for how to do this:

Turn on torch/flash on iPhone 4 - Stack Overflow

Hope this helps,
Rob
ufbobbo is offline   Reply With Quote
Old 08-09-2010, 08:10 AM   #79 (permalink)
Registered Member
 
Join Date: Apr 2009
Posts: 144
Default

Quote:
Originally Posted by ufbobbo View Post
See my post here for how to do this:

Turn on torch/flash on iPhone 4 - Stack Overflow

Hope this helps,
Rob
I used this answer, I have played with it but for my life I just can't get it working quickly. I can turn the flash on and off easily with a button, no issue, code works well.

But every time I turn the light on there is a delay and makes for a kind of slow app. I have seen torch apps which are pretty instant.

Any help?
kahanejosh is offline   Reply With Quote
Old 11-09-2010, 10:28 AM   #80 (permalink)
Registered Member
 
Join Date: Oct 2010
Posts: 1
Default

Quote:
Originally Posted by kahanejosh View Post
I used this answer, I have played with it but for my life I just can't get it working quickly. I can turn the flash on and off easily with a button, no issue, code works well.

But every time I turn the light on there is a delay and makes for a kind of slow app. I have seen torch apps which are pretty instant.

Any help?
Me too!
Trying to get this delay away for a week
Morpheus2002 is offline   Reply With Quote
Old 01-15-2011, 05:20 PM   #81 (permalink)
Registered Member
 
Join Date: Oct 2010
Posts: 2
Default

Has anyone come across a way around the delay issue? I'm trying to take a picture with a single flash (not double) and when I press the button it takes a good 3 seconds before the flash goes on!
bijanv is offline   Reply With Quote
Old 05-24-2011, 12:22 AM   #82 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 48
Default

Code:
import "torchViewController.h"

@implementation torchViewController

- (void)viewDidLoad {
	capSession=[[AVCaptureSession alloc] init];
	
    device=[AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
	
    [device lockForConfiguration:&err];
	
    [capSession beginConfiguration];
    
    input=[[AVCaptureDeviceInput alloc] initWithDevice:device error:&err];
    
    output= [[AVCaptureStillImageOutput alloc] init];
    
    [capSession addInput:input];
    
    [capSession addOutput:output];
    
    [capSession commitConfiguration];
    
    [capSession startRunning];

}

-(IBAction)lightOn{
[device setTorchMode:AVCaptureTorchModeOn];
}

-(IBAction)lightOff{
	[device setTorchMode:AVCaptureTorchModeOff];
}

/*
// The designated initializer. Override to perform setup that is required before the view is loaded.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
        // Custom initialization
    }
    return self;
}
*/

/*
// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView {
}
*/


/*
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
    [super viewDidLoad];
}
*/


/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/

- (void)didReceiveMemoryWarning {
	// Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
	
	// Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
	// Release any retained subviews of the main view.
	// e.g. self.myOutlet = nil;
}


- (void)dealloc {
    [super dealloc];
}

@end
Sorry for reviving this old post but can someone tell me what to put in the header file for this?
Dshoe is offline   Reply With Quote
Old 09-14-2011, 07:50 PM   #83 (permalink)
Registered Member
 
Join Date: Aug 2011
Posts: 1
Default

Code:
import "torchViewController.h"

@implementation torchViewController

- (void)viewDidLoad {
	capSession=[[AVCaptureSession alloc] init];
	
    device=[AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeVideo];
	
    [device lockForConfiguration:&err];
	
    [capSession beginConfiguration];
    
    input=[[AVCaptureDeviceInput alloc] initWithDevice:device error:&err];
    
    output= [[AVCaptureStillImageOutput alloc] init];
    
    [capSession addInput:input];
    
    [capSession addOutput:output];
    
    [capSession commitConfiguration];
    
    [capSession startRunning];

}

-(IBAction)lightOn{
[device setTorchMode:AVCaptureTorchModeOn];
}

-(IBAction)lightOff{
	[device setTorchMode:AVCaptureTorchModeOff];
}

/*
// The designated initializer. Override to perform setup that is required before the view is loaded.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
    if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
        // Custom initialization
    }
    return self;
}
*/

/*
// Implement loadView to create a view hierarchy programmatically, without using a nib.
- (void)loadView {
}
*/


/*
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
    [super viewDidLoad];
}
*/


/*
// Override to allow orientations other than the default portrait orientation.
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
    return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
*/

- (void)didReceiveMemoryWarning {
	// Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
	
	// Release any cached data, images, etc that aren't in use.
}

- (void)viewDidUnload {
	// Release any retained subviews of the main view.
	// e.g. self.myOutlet = nil;
}


- (void)dealloc {
    [super dealloc];
}

@end
How i use on .m files? please, reply me.. thanks
myach is offline   Reply With Quote
Reply

Bookmarks

Tags
api, camera, camera flash, flash, framework

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: 260
20 members and 240 guests
ADY, Alsahir, beleg_1998, Dani77, e2applets, iph_s, JasonR, mer10, Monstertaco, piesia, prchn4christ, Promo Dispenser, Robiwan, Rudy, sly24, smithdale87, timle8n1, Touchmint, twerner
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,880
Threads: 89,228
Posts: 380,758
Top Poster: BrianSlick (7,129)
Welcome to our newest member, @sandris
Powered by vBadvanced CMPS v3.1.0

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