I'm new in iPhone development, and I want to make a custom Reel/Spinner like the Reel in many iPhone fishing games, and I want capture the touch events, such as if the reel is moved to the right/left.
Where should I start?
Thank You!
I would look at using OpenGL ES.
On the other hand, you can often get very good results with just old fashion "flipbook" animation created by simply displaying slightly different images in sequence.
If you're just starting out, I would suggest you go over the MoveMe application tutorial. It will teach you many of the fundamentals of detecting touch events and responding using animations. If you need another sample, you can also have a look at the Touches sample.
Once you feel comfortable with detecting touch events, I would look into Core Animation. The Cookbook has a lot of examples on how to do many different tasks. The Animation Programming Guide also has some valuable information as to how to do various types of animations.
If you have any specific questions while figuring things out, post them here, and welcome to Stack Overflow!
Related
I'm building an iphone photo app. I don't know how to achieve this kind of effect on an image:
When the user drags a finger across the arrow, I want the image to be distorted accordingly. How can I achieve this? Is there any framework that makes this process simple?
Thank you.
No clue about iOS, but the look reminds me of a thin-plate spline warp. It's quite easy to implement in OpenGL, a quick Google search for example code returns plenty of hits.
From the sound of it I think your looking for the CoreImage framework. Look into the various distortion effects...in particular CIBumpDistortionLinear.
I don't have any code so check out this tutorial and read up on CoreImage.
I am planning to develop my first app in Cocoa. I have been collecting ideas for the UI and have settled in with the design very similar to iPhoto (i.e. library style or 'shoebox' application as referred by Apple's programming guide). In a nutshell I need master detail kind of setup like in iOS (iPad's UISplitview).
To achieve this should I put a NSSplitview and on the left panel have a NSTableView and on the right panel have a NSCollectionView?
Are there any examples/boilerplate or tutorials for creating app in OS X?
Your instincts are correct. You might decide eventually you want something more customizable that an NSCollectionView, but it’ll get you started fast and you can do most of what iPhoto does with it. (You can’t do rows with varying #s of items on them, like Delicious Library does, unless you write your own view.)
Good day,
I would like to take this opportunity to give my many thanks to the people of stackoverflow.com.
I have been new to coding, .net, over the past year, and I have always found stakoverflow to be a fantastic base of knowledge for learning. I spent the last couple weeks working, in depth, on a speech recognition project I am going to use with the upcoming release of Media Browser 3. Originally, the idea was to build a recognizer and have it control media. However as I moved through the different namespaces for speech recognition, it lead me into the realm of the Microsoft Kinect sensor. The more I use the kinect device, the more I would like to use some of the skeleton tracking it has to offer. Which leads me to my question.
I am not interested in build a WPF application that displays a window of what the kinect is seeing. This is part of a Form application, in which I would like to support only two of three gestures.
The idea is for it to watch for three gestures and simulate a key press on the keyboard.
So first I enable skeletonframe before the the audio for the recognizer, because I had read on here somewhere that enabling the skeleton after the audio canceled the audio for some reason.
Then I add some event handlers to my form.
I added skeletonFrameReady event.
I suppose my main questions would be, am I on the right track with skeleton tracking? Is it possible to do this from a form application without trying to draw th skeleton?
Thank you again,
I hope I made sense, sorry for my ignorance.
Ben
It is possible of course. For gesture recognition you can make a comparison between the positions of the joints (In the method that skeletonFrameReady event calls, which is called several times per second).
If you want to recognize complex gestures (like waving a hand), I suggest you take a look at this page http://blogs.msdn.com/b/mcsuksoldev/archive/2011/08/08/writing-a-gesture-service-with-the-kinect-for-windows-sdk.aspx and download the sample code there. (which is hidden in the last paragraph :)
Main idea is checking for predefined gesture segments with the correct order (If the segment1 is successful, look at segment2. If segment2 is paused, look at segment2 again until it is either successful or failed).
Hope this helps.
I'm working in Objective-C for a Mac cocoa application. It's a pretty simple question, but I can't find an answer. I just want to move a sprite across the screen, like in a Snake game. Do I need to use NSTimer or NSAnimation, and how would I use it?
Thanks
You could use Core Animation. It provides a unified way to move and animate visual elements on the screen.
If you plan to create a simple game, "Cocoa with Love" has a nice "Asteroid" example:
http://cocoawithlove.com/2009/02/asteroids-style-game-in-coreanimation.html
Another game-related Core Animation project is Apple's Geek Game Board:
http://developer.apple.com/library/mac/#samplecode/GeekGameBoard/Introduction/Intro.html
Well, actually it depends on how you imagined your application, there's a lot of way to make things move. If you do not need anything complex or particularly efficient you may just access and modify the NSView frame property. Otherwise you should consider use Core Animation or OpenGL.
Core Animation Programming Guide
OpenGL Programming Guide for MacOSX
Hi i'm thinking about making midi step sequencer and I need to make a note grid/matrix that resizes/ adapts when you zoom. I've been searching for different ways of doing this but cant figure out a way that works well.
I thought about drawing cell objects made with (NSRect) but I couldn't figure out how to get the right interaction when resizing.
This is my first "biggish" OBJ-c project so please don't kill me, im still battling with the frameworks and the syntax is so foreign to me.
You could use Core Animation layers to create your grid.
Take a look at Apple's Geek Game Board sample code project:
http://developer.apple.com/library/mac/#samplecode/GeekGameBoard/Introduction/Intro.html
The code shows a way to display different kinds of card/board games using CALayer.
The Checkers game looks to be the closest to the grid you want to create.