Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.
How to caputure an image and send it to a UIViewController or UIView
I assume you know how to get the UIImage object. Set up a view controller with an image property. Set that property with the UIImage object you get from the picture controller then present it using whatever method you want, pushing it via a nav controller or using the presentModalViewController method.
If you are looking for a quality developer, I'm your man. Give me a PM if you are interested.
Few quick doubts (Correct me if i m wrong) : UIImage *videoPreviewImage, this is populated with the image. then, why is setImageViewController.image = self.image;
Shouldn't it be setImageViewController.image = videoPreviewImage;
Also, immediately after the push , u are dismissing the current controller. I've my doubts on tat approach of urs as well.
Replies
New app - See screenshots and details at www.globaclock.com.
If you want to
- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like AwesomeEverything I have tried just hasn't worked.
I'm obtaining this image but how do I read the image from the view controller I'm pushing too?
I don't know how to connect these two view controllers together.
Now, if I should just push to a different UIView from the same controller, how do I do that?
What seems to be the better method here?
Again, this is a camera app that would work like Instagram or Photovine
- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like AwesomeNew app - See screenshots and details at www.globaclock.com.
If you want to
- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like AwesomeNew app - See screenshots and details at www.globaclock.com.
If you want to
- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like AwesomevideoPreviewImageView = [[UIImageView alloc] init];
[videoPreviewImageView setImage:self.img];
[self.view addSubview:videoPreviewImageView];
No clue if I'm on the right path or not.
- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like AwesomeNewViewController *aController = [[NewViewController alloc] init];
aController.image = videoPreviewImageView.image;
[self.navigationController pushViewController:aController animated:YES];
NewViewController is a subclass of UIViewController and it has property for image.
wen i mean property , somethin similar to the below code in .h:
@property (nonatomic, retain) UIImage *image;
Synthesis "image" in the .m class
now u can use the image in the NewViewController by just using "self.image".
Hope this helps...!!!!
- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like AwesomeaController.image = videoPreviewImageView.image;
There is issue with this line of code.
I have image as a property and synthesized.
- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like AwesomeIt would b easy if u can paste ur code here...
Cheers
RKO
- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like Awesomethe above code comes in ur current view controller , after u've an image populated in "self.img"
- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like AwesomeFirst View Controller:
UIGraphicsBeginImageContext(videoPreviewView.bounds.size);
[videoPreviewView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *videoPreviewImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
NSData * imageData = UIImagePNGRepresentation(videoPreviewImage);
NSString * filePath = @"photo.png";
[imageData writeToFile:filePath atomically:YES];
SetImageViewController * setImageViewController = [[SetImageViewController alloc] initWithNibName:@"SetImageViewController" bundle:nil];
setImageViewController.image = self.image;
[self.navigationController pushViewController:setImageViewController animated:YES];
[setImageViewController release];
[self dismissModalViewControllerAnimated:YES];
Second View Controller:
videoPreviewImageView = [[UIImageView alloc] init];
[videoPreviewImageView setImage:self.image];
[self.view addSubview:videoPreviewImageView];
- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like AwesomeUIImage *videoPreviewImage, this is populated with the image.
then, why is
setImageViewController.image = self.image;
Shouldn't it be
setImageViewController.image = videoPreviewImage;
Also, immediately after the push , u are dismissing the current controller. I've my doubts on tat approach of urs as well.
The rest looks fine :)
- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like Awesome