Draw image xcode6 ios8 - ios

Good afternoon,
I would like to know if I can take a picture and then draw something in the image (with the finger movement, for example, a black line "handwritted"). Is it possible?
If that's possible... How can I start doing that?
Edit:
I want to take a picture from my iPhone (that's what I currently have in my App) and then I would like to draw something in that picture.
Thanks in advance.

There is no one tutorial to this. And as #Stephen mentioned in the comments, it is not a 2 min job. However, you can start with the following tutorials.
http://w3z.in/7ef - How To Make A Simple Drawing App with UIKit.
http://w3z.in/9b1 - Apple's official UIKit guide.
http://w3z.in/e2c - iOS 7 graphics tutorial.
The key here would be to have patience, do some small experiment apps and then figure out what to do in your app.
Thanks

Related

Apple's SpeedSketch example app is very laggy

I want to create an app which uses the Apple Pencil (or just a finger) to draw/sketch/write on a blank "sheet" on the iPad. Last WWDC there was a session which shows how the Apple Pencil should be used inside an app.
Here's a link to this session: https://developer.apple.com/videos/play/wwdc2016/220/
(You can download the example app there.)
When you start to draw something it works really great. But after a while, if you have drawn a lot, it gets really laggy and I don't know why. I want to use this code inside my app to be able to use the pencil, but I can't use it like that, because it get's really annoying when you want to draw something and it takes some time until the line is showing up.
There is the following comment in CGDrawingEngine.swift:
/**
Note: this is not a particularily efficient way to draw a great stroke path
with CoreGraphics. It is just a way to produce an interesting looking result.
For a real world example you would reuse and cache CGPaths and draw longer
paths instead of an aweful lot of tiny ones, etc. You would also respect the
draw rect to cull your draw requests. And you would use bezier paths to
interpolate between the points to get a smooother curve.
*/
It would be very nice if you could try to understand what's exactly happening and why it is very slow after some time and how to change the code according to Apple's comment on the drawing function.
(PS: I should mention that this example app is only running on iOS10 Beta with Swift 3.0)
EDIT: I'm testing this app on an iPad Pro (12.9") with iOS10 Beta 5.

Slingshot action (movement) without cocos-2d

I want to create a game in which the sling shot will be used like in angry birds or sling shot game. I want to ask can is this possible to make the slingshot action like it throws at object in the angle with out cocos-2d. Please help me how should I proceed with this because I do not much on cocos 2d.
Thanks in advance.
I think you must make a method which will find the points to make a path from initial point to end point.
for that you need to use some dynamics concept.
after that you can implement animation of view along "path".How would I implement animation along a path using the iPhone SDK?
Hope this help
I think you should just go with buying this starter kit if you want to avoid deep dig into cocos2D.
It's got good dynamic features with lots of documentation.
You can UIView animation alternative of Cocos2d

How to animate for a 2D ios game?

I'm planning on making a simple 2D game (I'm leaning towards an endless runner) for the iPhone and am using cocos2d and I can make stand alone images in Photoshop or Illustrator but I'm not sure what the best way to animate them is??
I don't know if I should animate a character running in flash then save each frame as a png and then use something like texture packer to make a sprite sheet or loop the png's together in cocos2d?? I don't know what works well with cocos2d and how to optimize the animation to run smoothly and reduce memory. I'm aware it maybe a broad question but any help or guidance would be appreciated.
You should use sprite sheet and animate the frames using cocos2d.
Here are the tutorials by Ray Wenderlich
Here is the official coco2d video tutorial and sample
Plenty of tutorials out there. Your question is probably going to be flagged and closed in the near future. Try googling your questions first next time.

How to zoom a circular region with Cocos2d?

I am working on a Cocos2d project for iPad and iPhone, and now I need to develop something that looks too small for iPhone.
My first approach was to redesign it to make it possible to look bigger, but then I though that a region zoom effect would be great. The bad point is that I don't know how to do it... I really don't know what would be the correct/best approach to do it.
I have already checked out the Cocos2D CCLens3D build in effect, but it doesn't give me the results I want.
I would love to get the same result than when you long-press a textview/textfield on the UIKit:
Thanks in advance for your help!
If your still looking for a solution:
http://rombosblog.wordpress.com/2012/06/03/magnifierglassforcocos2d/
Uses CoreGraphics to render. Although this implementation works (requires some tweaking), I found that it lacked that Gaussian distribution effect I was looking for and was quite expensive if you updated the magnifying effect in a small interval.

How to make a screenshot of OpenGl ES on top of the live preview camera in iOS (Augmented Reality app)?

I am a very beginner in Objective-C and iOS programming. I spent a month to find out how to show a 3D model using OpenGL ES (version 1.1) on top of the live camera preview by using AvFoundation. I am doing a kind of augmented reality application on iPad. I process the input frames and show 3D object overlay with the camera preview in realtime. These was fine because there are so many site and tutorial about these things (Thanks to this website as well).
Now, I want to make a screen capture of the whole screen (the model with camera preview as the background) as the image and show in the next screen. I found a really good demonstration here, http://cocoacoderblog.com/2011/03/30/screenshots-a-legal-way-to-get-screenshots/. He did everything I want to do. But, as I said before, I am so beginner and don't understand the whole project without explanation in details. So, I'm stuck for a while because I don't know how to implement this.
Does anybody know any of good tutorial or any kind of source in this topic or any suggestion that I should learn more in order to do this screen capture? This will help me a lot to moving on.
Thank you in advance.
I'm currently attempting to solve this same problem to allow a user to take a screenshot of an Augmented Reality app. (We use Qualcomm's AR SDK plugged into Unity 3D to make our AR apps, which saved me from ever having to learn how to programmatically render OpenGL models)
For my solution I am first looking at implementing the second answer found here: How to take a screenshot programmatically
Barring that I will have to re-engineer the "Combined Screenshots" method found in CocoaCoder's Screenshots app.
I'll check back in when I figure out which one works better.
Here are 3 very helpful links to capture screenshot:
OpenGL ES View Snapshot
How to capture video frames from the camera as images using AV Foundation
How do I take a screenshot of my app that contains both UIKit and Camera elements
Enjoy

Resources