[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1938
  • Last Modified:

how to make flip transition effect like the one in ipad music album artwork (Xcode)

as the question above, something similar to this :

ipad music album artwork
already tried a view method but the whole main view was flip instead of just the small view.
so in a brief :
1. press a button (which is album artwork)
2. the album artwork transform and flip animated
3. detail view show up

thank you.
0
redribbon14
Asked:
redribbon14
  • 4
  • 4
  • 3
1 Solution
 
Hamidreza VakilianSenior iOS DeveloperCommented:
You should use this syntax:
 [UIView transitionWithView:placeHolderView duration:0.5 
 options:UIViewAnimationOptionTransitionFlipFromRight animations:^{
 [placeHolderView addSubview:detailViewController_Instance.view];
 } completion:nil];

Open in new window


 Here is a sample project I created for your convenince:
 http://5.9.197.49/Q_27873093.zip
0
 
pgnatyukCommented:
I think, 'addSubview' inside the animation block looks wrong.
I'd say
[UIView transitionFromView:view1
                    toView:view2
                  duration:0.4
                   options:UIViewAnimationOptionTransitionFlipFromRight
                completion:^{
                }];

Open in new window

looks much better.
Here is a post about this kind of animation:
Flip an image in UIImageView using UIView transitionWithView
0
 
Hamidreza VakilianSenior iOS DeveloperCommented:
pgnatyuk: saying that's wrong is definetely absurd. As a programmer you know there may exist serveral ways to accomplish same thing. Your code is also correct; it's an equivalent to transitionWithView method here. The results are the same. Of course using addSubview is not wrong in my code; the view gets added to the superview then the animation will perform properly.
0
New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

 
pgnatyukCommented:
Programmer-x: by the way, can you explain why it's possible to use addSubview in the animation block in your code?
0
 
Hamidreza VakilianSenior iOS DeveloperCommented:
As you check the sample project you see it works. UIView is capable of applying animation on adding and removing UIViews. You may tell me why it's not possible...
0
 
pgnatyukCommented:
I meant something else.
The code you posted looks not very well. Any UIView object can be added only to one view. You used addSubview in the animation block. It works. But it looks not very well, because it's against the rule.

A parent view may contain any number of subviews but each subview has only one superview, which is responsible for positioning its subviews appropriately.

UIView Class Reference
0
 
Hamidreza VakilianSenior iOS DeveloperCommented:
You are right; as in the sample project I provided above I removed the old UIView from the parent before adding the new one.
0
 
redribbon14Author Commented:
@pgnatyuk n programmer-x : thank you for the solution, but what im trying to accomplished here is exactly the same animation from ipad album artwork, not just a simple flip. as you can see the view transform from one view(small view) to another detail view(which is becoming bigger size) and also when you try to get back to small view, the transition is reverse and not doing the same animation( from left to right and from right to left).
what the programmer-x shown me above is just a simple flip animation. im trying to replicate the exact animation from iPad.
@pgnatyuk, i havent try your solution here but i assume it work similar to programmer-x ?
0
 
redribbon14Author Commented:
1. may not have the possibility acting exactly?
2. experts have provided with some great solutions?

wow, this is my second question on this pay site that doesn't  get solved.

1. check this app and tell me how my question is not even possible to accomplished?
http://itunes.apple.com/id/app/jetsetter-for-ipad-hotels/id416813861?mt=8
oww, its free so feel free to download it

2. how can its a great solutions when all the provided method that they give is available on the internet for free and even i already know this method long before i asked this question.
ps. check stack overflow / iphonedevsdk, all the method above already available on that sites, so its not an expert method, its just a COMMON method.


i put this question because i already tried many methods before and none of it works exactly like what i want and dont tell me its not possible coz the devs from jet setter show it that they CAN do it and it is POSSIBLE to do it. thats what i call an expert.
0
 
pgnatyukCommented:
@redribbon14: I'm not an administrator here, so it's just my private opinion, and maybe a wrong one.
You posted a link to a nice Apple Store application. It's a commercial product. Do you want an expert here to make such app for you? Sometimes it happens :).  But not this time.
When we answered on your question, we explained exactly how to implement this effect. Of course it was not a secret and it can be found in the iOS documentation and in the free internet.
0
 
redribbon14Author Commented:
thank you for the frankly explanation, rather then calling my question as "not possible".
ok can someone here point me how to unsubscribe from this site? much appreciated.

ps. im not asking for making the whole application as my own apps already 90% done. i just thinking that adding this effect to my apps would be a nice addition. well, nevermind its just your opinion anyway. this makes me learn that a free community sometimes can be really helpful than a "PAID" one.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

  • 4
  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now