This question already has an answer here:
Is it possible? camera api ios [closed]
(1 answer)
Closed 9 years ago.
I was wondering if its possible to show a layer (UIImageView?) on top of the camera view while taking a picture. I know its easy to implement a layer after the photo is taken but I want to show that layer while taking the picture. Think of it like a frame for your picture.
I've never seen an app that has done this before so I was wondering if it's even possible.
The term you are looking for is an overlay
Here's Apple's sample code.
Related
This question already has answers here:
Draw lines between points(multiple)
(2 answers)
Closed 8 years ago.
Can someone show me an example on how to plot points and connect them in iOS objective C. Do I need to put CGPoint's in an array or can we draw one point at a time? What we want to do is calculate the corresponding y value from x value and make a CGPoint and plot them, in a for loop.
Thank you
It's not really about what language you are using, it's about what technology stack you are using. iOS? Mac? Then there are many options: 3rd party library, Core Plot, Core Graphics (2D procedural drawing API), Open GL, Core Animation (2D/3D compositing and animation API) or even some combination of these.
The correct answer depends on what you are building, big picture.
As it stands I think the question is to broad to answer.
This question already has an answer here:
iOS CoreImage Edge detection
(1 answer)
Closed 9 years ago.
Here is the UIImage, Wikipedia icon,
But it is a png file, but I would like to find the boundary of this image like this(Sorry, ugly drawing):
Is there any existing algorithm that allow me to find out the image?
Here is the assumption:
1. All the background is transparent.
2. The image MUST be one big piece.
Thanks.
Are you looking for this. I didn't tried this myself but it will solve your problem seems. Here's the tutorial.
UIImage* edge = [myImage edgeDetectionWithBias:0];
I am not sure, if it will solve your problem.
This question already has an answer here:
Closed 10 years ago.
Possible Duplicate:
playing Random sounds on a soundboard app
I'm trying to make an app that when I press a button it plays a random sound each time. I have 20 sounds altogether but the problem is I'm not the best coder and could really do with some help on this.
First question: is this possible?
Second question: do you have any code that work for this?
my question was edited please note i wasn't this rude when i typed this out
Create a view in storyboard. Add a Button to it, which calls a routine.
Let this routine get a random number (arc4random) and use a switch
to play the song.
This question already has answers here:
Images for iphone 5 retina display
(5 answers)
Closed 9 years ago.
So typically on storyboard, you assign an imageview with the image you want (foo.png) and then the phones automatically upsize to the retina version if one is on the iPhone 4 or 4s (foo#2x.png).
The question is, how do you get an image to display properly on a 4'' iPhone 5? It is all out of whack when I try it in the simulator and Apple has yet to address this situation with a simple solution as they did with the Retina display of the iPhone 4's. Any help? Thanks!
iPhone 5 support can be added very simply by adding a default#2x-568.png file to your project. Beyond that, it is only a case of making certain the app scales to a new size correctly. Make sure your views accomodate to the new size either programatically, or by setting springs and struts correctly in your UI archives (XIBs or Storyboards as appropriate). You shouldn't need any new images (*). If you already
support retina devices, then you only need to add the new splash screen as above.
(*) If you do for whatever reason, I'd recommend reading this answer:
ios6 UIImageView - Loading -568h image
Apple doesn't provide a good way of using different images on the iPhone 5, because you aren't supposed to use any!
This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
How to generate an end screen when two images collide?
how to generate an end screen when two images collide. I am making an app with a stickman you move with a very sensitive acceremeter. SO if it hits these spikes, (UIImages) it will generate the end screen. How do I make the app detect this collision and then generate an end screen.
if (CGRectIntersectsRect(imageView1.frame, imageView2.frame)) {
// Do whatever it is you need to do.
}