Making OpenFlow work vertically like a Rolodex - iphone

I've been looking at integrating the OpenFlow API developed by Alex Fajkowski: http://fajkowski.com/blog/2009/08/02/openflow-a-coverflow-api-replacement-for-the-iphone/ into an app I am working on.
Does anyone know how I can stack the images vertically so that I can scroll the images from top to bottom/bottom to top like a rolodex?
The default behaviour is for OpenFlow to stack the images horizontally and scroll the images from right to left/left to right just like CoverFlow. I've been trying to get my head around how 3D animation is done in Objective-C without much success...
Thank you for your help in advance.

The really easy thing to do is to rotate the whole view with something like this:
openFlowView.transform = (CGAffineTransform){0,1,-1,0,0,0};
You'll then have to un-rotate all the flowing views (or rotate the images, or whatever).
The better way is to fix OpenFlow, but without looking at its source code, it's not obvious what to change (mostly you should just need to swap "x" and "y").

Related

Swift Slamming Logo Animation

I am creating an application in Swift, and I would like to make an introduction screen that shows off my logo. I want the logo to slam down on the screen, which will then cause a crack, and then that crack slowly grows. I think I can figure out slamming the logo down (by shrinking a UIView of my logo to a certain point), but I am having trouble deciding how to create the crack that will form from slapping down. Do I use views? I am lost.
This is the closest thing that I found to what I would like to do. Sadly, I do not have this software.
https://www.youtube.com/watch?v=bh2y0Xs4IWA
I have created a similar effect before. And to achieve the crack a created multiple images of a growing crack and created an array of images for that screen crack. All you have to do then is animate the images if the imageView.
The other way you can Handel this is to actually draw the crack your self by code which is not difficult really, because in reality it’s just lines and then animate them. But in my experience just using the first method gives a much nicer effect because the images you use can have tons of effects using PS or equivalent.
I would suggest to go with third party like lottie. In lottie files there some animation you except there, you can also message the designer to help out animation. Its very simple to use in swift.
https://www.lottiefiles.com/
you can also check out my profile:
https://www.lottiefiles.com/parameshvadivel
Lottie animation are done in aftereffects using bodymoving extension and exported as json file to use in xcode.

Navigating a view with Gyroscopes - iOS

i'm new to game developing so i might be a little confusing on defining what i need.
Assume i have a wide background picture, much bigger than the screen(e.g.4000*3000px), how should i approach if i want to navigate it with the input from the gyroscopes?
i mean handling the device up, down, left, right and so on.
If you remember the old Mosquitoes game on Symbian i would like to do something similar but without the camera.
However any suggestion is appreciated.
Thanks in advance.
Use UIScrollView - put your pic inside the scroll view and try to navigate with fingers.
When scroll will be working nice, use this or this or any other tutorial to find out how to use accelerometer.
Finally, when you will be able to collect data from accelerometer, give it to UIScrollView using [myScrollView scrollRectToVisible:myRect animated:YES];
All needed math and physics must be done by you.

horizontal scrolling level select

Ok so i have a good chunk of my game finished now and Im working on my level select view. I want to implement a horizontal scroll view with multiple buttons on each view, in something that looks like Angry Birds or Cut The Rope, or something like that. I know I use a scroll view and set anchor points from my reading on here and other sites but im not sure exactly how i can implement that. Im a bit of a noob and my game didnt need to implement any real graphics so im not familiar with open gl or quartz, although im not afraid to try to learn it.
Anyone know how i can implement anchor points in a horizontal scroll view for my level select view?
Thanks!
As already answered, you have to use UIScrollView. We use scroll view when our contents are too large to be shown on the screen.
Refer the class reference here and Some links that could hep you.
Apple's scrolling demo
Understanding Scrollview

iphone image carousel

I hardly know how to explain my case other than to point to the excellent Absolute vodka app, Drink Spiration.
I am trying to make a carousel like image browsing with a little spice. I would really like to find a simple core animation explanation on how to accomplish something like the above app.
I hope someone can help with this. The solution doesn't have to be exactly the same, but just explain what is happening and it would be best if it was simple and no opengl. Just something to point me in the right direction. I don't think using just a scrollview with uiimageviews is enough.
I wrote something similar and its quite easy once you figure it out in your mind. All done justing using regular old views and animating transforms on them.
Say its 3 images on screen, and you can rotate new ones on and off ... then you will need 5 views set up (most simply just a UIImageView with a relevant image set). They are the currently selected image, the two either side of it and the ones that are, or will be animating on or off when the user flicks left or right.
Each of these 5 images has a position, an angle and an image. When the user flicks left or right each gets animated to the next position and angle, views that are about to come onscreen have their image updated to the next image in the set. If the user keeps on flicking in the same direction you simply reposition views on one side as they come off the other.
With this setup you can do lots of cool carousel like things very simply.

Iphone Scrollview Question

i am quit new at iphone development and trying to make a photo collage software while learning it. Right now i have a lil problem and hope you can help me out.
I have an UiviewController with a view in it, in this view i have 7 scrollviews with uiimagevies in them for zooming and scollign images within these scrollviews.
All that works well but now i want to make these 7 scrollviews dragable and maybe if possible zoomable (so that the image within the given scroolview zoom together with the scrollview).
It should be possible to drag them all around the screen and if possible even overlap them
and by the way rotating would be great ;-) hope that is not to much asked for.
Would be great if someone can help me out with this..
Well you've got to decide on some other choice here because the functionality you are asking for overlaps, and you can't ask the app to magically know which the user wants to do. What I mean by this is that when you touch and drag within a scroll view, it's going to try to scroll itself, rather than drag the entire scroll view around.
As for rotation and zooming - that gets more complicated, because you start dealing with vector math and the like. You can check out my question on rotation here. The link I gave you has the code to get both rotation and zooming to work.