Move a UIView below a subview in animation block

Hi,
I am moving UIViews inside an animation block [UIView beginAnimations:context:] [UIView commitAnimations] by changing the view's view.frame to a different CGRect values. And I need to move a subview below the subview on its right when swipe movement to the right is detected.
All subviews are created with a different set of CGRect valudes and added to self.view in viewDidLoad. Is there any way to move a UIView under a subview without using [self.view insertSubview:firstView belowSubview:secondView] inside the animation block?
Thanks in advance,
aobs

I have tried the above code. Unfortunately, it does not work. Can anyone point me in the right direction on how I can move a subview below another subview in an animation block?
Thanks,
aobs

Similar Messages

  • Adobe Captivate 4 - How do I include the playbar in the movie, rather than below it?

    Hi,
    As the title says, how can I have the playbar displayed inside the movie window rather than as a seperate entity below it?
    We used Captivate 1 up until recently to make our training videos. We would use the playbar "PresenterSilver" and then insert text boxes into the slides as a sort of guide as to what section the user was currently viewing. We would also use this to show the author and the date. A static image was used as a background also (this was created in Fireworks to look the same as the PresenterSilver background).
    This setup worked fine for all our movies. However when we upgraded to Captivate 4 the PresenterSilver skin is no longer there. The playbar is also no longer part of the movie but is below the window.
    I was wondering if it possible to include the playbar the way it used to be. If not, then can someone suggest a work-around? I was looking at it earlier and I see that you can use image files as backgrounds around the player. This is not ideal as I think that the images remain static for the entire movie. And we could not have a set image (e.g. Part 1 for slides 1-3, Part 2 for 4-6 etc.) for different slides, it would have to be the same the entire way through. If I am mistaken please let me know.
    Thanks for your help,
    Eoin.

    Hi there
    Unfortunately Adobe changed the playing field with version 4. You are no longer able to have the playbar occupy part of the main movie.
    Please report this as a bug to the development team. The link is in my sig.
    Cheers... Rick
    Helpful and Handy Links
    Captivate Wish Form/Bug Reporting Form
    Adobe Certified Captivate Training
    SorcerStone Blog
    Captivate eBooks

  • In iOS7 the titles of movies are NOT below the films

    In iOS7 the titles of movies are NOT below the films.  I have 24 work demo films that I have made on my iPad and and now I have to search through them one by one to find the title in the current design.  How do I get the titles back?
    They all start with the name of my company ... and then the subject so a "The" has to be accounted for.
    iOS7 is not shown below as an option!

    I'm right there with you guys. Same problem. I'm repairing permissions with the disk utility to see if that helps. I'll let you know.

  • Want to move an image and it's keyframed animated mask

    I want to move an image and it's keyframed animated mask to a new position.
    What steps do I need to undertake to accomplish the seemingly impossible task?
    Thank you.

    You should try placing it all inside a movieclip by copying/pasting it into the movieclip timeline.  That way it is completely mobile.

  • Recursive animation block problem

    Hi all,
    i have a recursive animation block.  It calls itself according to the parameter value which can be 3 or less.
    when this parameter value is  two or one, animation is working correctly.  If the parameter value is 3, the animation block (although it works correctly in the code,debug mode), the screen seems to be called on it once.
    But, if the parameter value is 3, When I put  2 seconds between each recursion call,  the animation also seems  correctly on the screen.
    What could be the cause of the problem?
    Xcode 4. 2
    Build 4D199
    iphone 5.0 Simulator
    //Animation Definition
    -(CAAnimationGroup*) getAnimationGroupForLayer :(UIImageView *) layerView duration :(float) duration
        UIBezierPath *movePath = [UIBezierPath bezierPath];
        [movePath moveToPoint:layerView.center];
        [movePath addQuadCurveToPoint:self.totalQuestion.center controlPoint:CGPointMake(160, 240)];
        CAKeyframeAnimation *moveAnim = [CAKeyframeAnimation animationWithKeyPath:@"position"];
        moveAnim.path = movePath.CGPath;
        CABasicAnimation *opacityAnim = [CABasicAnimation animationWithKeyPath:@"alpha"];
        opacityAnim.fromValue = [NSNumber numberWithFloat:1.0];
        opacityAnim.toValue = [NSNumber numberWithFloat:0.1];
        CAAnimationGroup *animGroup = [CAAnimationGroup animation];
        animGroup.animations = [NSArray arrayWithObjects:moveAnim, opacityAnim, nil];
        animGroup.duration   = duration;
        return animGroup;
    -(void) doAnim4Layer:(UIImageView *) layerView
        [layerView.layer addAnimation:[self getAnimationGroupForLayer:layerView duration:0.25] forKey:nil];
    //Recursion
    -(void) startAnimation:(int) counter
         [UIView animateWithDuration:0.25
                         animations:^{
                             [self doAnim4Layer:(counter == 3 ? self.star1:(counter==2? self.star2:self.star3))];                                             
                         completion:^(BOOL finished)
                                [self addStar:1];      
                                if(counter == 1)
                                    [self getNextQuestion]; 
                                }else{
                                    //sleep(2);  //works correctly when initial value 3
                                    [self startAnimation:counter-1];

    i found problem.  Let me explain.
    when  i was calling animation block, i called other method which is also CAAnimation.  But i didn't implement of its delegate methods (
    - (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag{
    Now,  this delegate method is implemented and recursive animation  is done in this method.  Everthing is now ok.
    - (void)animationDidStop:(CAAnimation *)theAnimation finished:(BOOL)flag{
      self.animationCounter--;
       [self addStar:1];
        if(self.animationCounter>=1)
            //recursive call
             [self layerMovedAnimation:
                           [self getAnimatedStar:self.animationCounter]
                                andLayerName:                       [NSString stringWithFormat:@"star_%d",self.animationCounter]];
        if(self.animationCounter == 0){

  • Movie Clip in swf won't show animation in adobe premiere pro cs4

    Hi, I am new to this forum and as well as a beginner user of adobe premiere pro cs4. I am recently making a animation using Adobe Flash CS5, I've been using movie clips symbol to create all the movement of the character, background and stuff. Unfortunately, swf movies exported from Adobe Flash CS5 do not show any animation at all in Adobe Premiere Pro CS4. I have to use movie clips symbol instead of graphic symbol because filters can be added to a movie clip symbol but not graphic symbol. Is there any way to help making the movie clip symbol to be shown in Adobe Premiere Pro CS4? Your help is much appreciated.

    Check Flash help in the "video" section, specifically "moving content between" PR and FL. (I was looking at CS4, but it must be there in CS5 help as well.)
    Your movie is to be watched on a TV?  I would do this in After Effects. because you'll lose most of the flash functionality once you go to video anyway,

  • How can I move the tabs below the address bar in linux/FF 24?

    I prefer the tabs to be under the address bar on my Firefox. Previously I could simply click or unclick an option to do this, and it remained the same as I upgraded. However, I recently moved to Linux Mint 16, and it had Firefox 24 already installed. I synched my bookmarks, but was unable to locate the option to move the tabs. I actually have the roomy bookmarks toolbar, and the tabs previously sat below it. Ideally, I would like to get them there again.

    You can use the Classic Theme Restorer extension in Firefox 29 and later to restore some lost features including tabs on top.
    *https://addons.mozilla.org/firefox/addon/classicthemerestorer/

  • Set dock to only show for some hotkey or if move mouse 5" below screen?

    It would be great if the dock would only show if I moved my mouse about 5 inches below the bottom of the screen. It is too easy to activate it.
    Is there a way to set it to do this, or disable it unless a certain hot key is pressed?

    Is there no way to do this?
    I've got two monitors. If I move it the the left of the screen, it is way over on my 2nd monitor and it still gets tripped when I don't want it to.
    I want to be able to disable it entirely (maybe open it with a hot key).
    Or, ideally, there must be a setting somewhere to set the vertical mouse position necessary to trigger the doc. That could be made well below my monitor, so that it would only trigger if I moved my mouse way outside of the normal range of motion.
    Thanks!

  • How to show movies and pictures as moving objects over animations.

    I'm creating a wedding movie, and i want to display some pics and video as well as the typical airplane animation flying from Toronto to Mexico with the red dotted line.. Any ideas where to start?

    Studio X wrote:
    .. typical airplane animation flying from Toronto to Mexico with the red dotted line..Any ideas where to start?
    In Toronto?

  • Set doc to only popup when move mouse WAY below edge of screen?

    Has someone ever come up with a way to manage the Dock?
    Ideally, I'd like to set it so that it NEVER pops up unless I move my mouse WAY below the edge of the screen.
    Right now, it always gets in the way of using my apps.
    Or, just a specific corner to set it off?
    Just some way to stop it from popping up when I'm trying to work with a Pro app, where I'm often at the edges of the screen.

    Les Caudle wrote:
    Thomas - I don't want to give up any screen space.
    On Windows XP, I have a small icon where I can pop up a screen that has all program icons I choose, arranged like I want in groups.
    Leopard is not Windows, fortunately. If you want Leopard to be more like Windows, then in the end why not use Windows?
    Comparisons between different OSs, to me, is usually meaningless. I use Vista and XP on PCs as well as Leopard and Tiger and Windows on my Macs.
    I don't bother with comparisons.
    If you want a new feature in Leopard, you can suggest it to Apple here:
    https://bugreport.apple.com/
    You can also search the net for various hacks to do exactly what you want to do or you can get creative and create your own hack.
    I'd be very happy to kill off the doc - as it only works for so many programs before becoming cumbersome, and seems just a feature to amaze Mac neophytes with a cool effect, until they start getting annoyed with it.
    As a non-neophyte who has been using computers for a very long time, including Unix mainframes, I don't see the dock as a "cool effect" and I do not find it annoying.
    If you spent more time in a terminal, perhaps you would see the difference between Leopard and Windows and find some really "cool" stuff down under the hood, where we non-neophytes usually hang out.

  • How do I move my TABS below the address bar WITHOUT having to install an add on ?? may have to goto another browser now!

    Firefox just updated and now my TABS are above the address bar...
    I do not wish to add another add on, it should be basic functionality to do this (as in previous versions)
    The vast population of users also want this according to the forums.
    How do I do this without having to resort to a "FIX" or an add on as this would add to memory usage.. ??
    Why have you removed this functionality?

    So if I dont want to install an add you suggest installing an add on???
    PS, I dont want to install an addon!!

  • My toolbar of "file, edit, etc." is way up at the top of the screen which is inconvenient and hard to see. How do I move it down below the address bar?

    <blockquote>Locking duplicate thread.<br>
    Please continue here: [[/questions/866419]]</blockquote>
    This occurred when I updated my firebox to edition 5.

    Press the alt key next to the spacebar. Do you see it now? If so, click View -> Toolbars" and check the Menu bar. See [[Menu bar is missing]] for more information.

  • Flash Animation Blocks Drop-Down Menu

    I added a simple flash animation (slideshow) to a site I am
    working on which is located under the navigation bar that has a
    drop-down menu (created in Fireworks). When I preview the site in
    Firefox or Internet Explorer on a PC, the drop-down menu is behind
    the flash animation and all of the links cannot be seen. Is there
    an easy solution to this problem?
    Thank you,
    Troy

    "FlineCo" <[email protected]> wrote in
    message
    news:gopblq$c47$[email protected]..
    >I added a simple flash animation (slideshow) to a site I
    am working on
    >which is
    > located under the navigation bar that has a drop-down
    menu (created in
    > Fireworks). When I preview the site in Firefox or
    Internet Explorer on a
    > PC,
    > the drop-down menu is behind the flash animation and all
    of the links
    > cannot be
    > seen. Is there an easy solution to this problem?
    Google "wmode" and use opaque
    Thierry | Adobe Community Expert | Articles and Tutorials ::
    http://www.TJKDesign.com/go/?0
    Spry Widgets |
    http://labs.adobe.com/technologies/spry/samples/
    [click on
    "Widgets"]
    Spry Menu Bar samples |
    http://labs.adobe.com/technologies/spry/samples/menubar/MenuBarSample.html

  • Polygon drawn with CG gets distorted after a UIView animation.

    Hi all,
    I've managed to draw a polygon on an UIView with a helper function that gives me an array of CGPoints which I loop through going CGContextAddLineToPoint.
    I can rotate the polygon by applying a CAAffineTransformMakeRotation object, I have a UIButton associated with a rotate function and it works fine.
    Problem is if I move the UIView down (as with a UIView beginAnimations) and the polygon is rotated in any manner, I can see an animation of it being distorted and disappearing!
    Any clues???

    G'day mate! My favorite San Fran radio station is currently running a 60 sec. travel commercial featuring an authentic Aus announcer (or crocodile hunter) along with an American translator. The idea is to teach us to speak Australian before we get there. I'm a slow learner, but maybe by the time I learn Obj-C I'll know how to ask for directions to Queensland.
    No, I've never been a student at Stanford. CS 193P, last autumn, was given through the Stanford Center for Professional Development, so you didn't need to be a regular Stanford student; an application to the graduate school was required, but all the lectures were on video and I don't think you ever needed to be on campus to complete the course. I think the full tuition was over $3000. I would have gone for that if it had been a live class with the opportunity to ask questions. But I was told questions could only be asked by e-mail and those might or might not be answered in the recorded lectures. I didn't even ask my employer to pay for the class since my job was to develop Win32 apps. At the time I wasn't willing to confide a secret desire to become an iPhone programmer.
    Anyway.. (I can't wait to see the comments about people who litter this forum with their life story) I haven't yet built a test bed to try out your code, but you are indeed moving your subview by resetting the frame. Note the warning in the doc: "If the transform property is not the identity transform, the value of this property is undefined" [https://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIVie wClass/UIView/UIView.html#//appleref/doc/uid/TP40006816-CH3-SW5].
    Try adding a translation to the current transform like this:
    CGAffineTransform t1 = myPolyView.transform;
    CGAffineTransform t2 = CGAffineTransformMakeTranslation(x, y);
    myPolyView.transform = CGAffineTransformConcat(t1, t2);

  • UIView Animation Question

    To all,
    I have a question about how to handle the asynchronous call when a UIView animation is created. My setup is as follows. I have a method in a view controller that get user input from and then makes external http calls. Since the calls could take a few seconds I wanted to notify the user when the call started and ended. In order to show this message I created a simple animation block in a method which I will list below.
    The animation simply slides a box up with a label on it and then slides it back down. A pop up slider if you will.
    This is my method which does the http processing simplified down.
    My problem is that since the animation call is asynchronous the and takes 4 seconds total to complete. If the HTTP processing takes less then 4 seconds (at times it does) the next displayMessage is called and my animation gets screwed up.
    The thoughts I have had were to have a check to see if the animation was running which is set true in the pop up reveal and false in the popup hide. Then I could simply sleep my thread if the boolean was true. But this wasn't working since the animation stop block was never called.
    I need to bounce ideas of you guys cause I don't know how to get past this basic problem.
    - (void)loadPostViewController:(id)sender
    [self displayMessage:@"Parsing address"];
    //Actual http processing code here which invokes external service
    [self displayMessage:@"Address processed"];
    - (void)displayMessage:(NSString *) inMessage
    CGFloat PostListViewXOFFSET = 20.0f;
    CGFloat PostListViewYOFFSET = 20.0f;
    NSInteger messageWidth = 150;
    NSInteger messageHeight = 60;
    self.transitioning = TRUE;
    self.view.userInteractionEnabled = NO;
    UIView *localContainerView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
    CGRect messageFrame = CGRectMake(0,0,messageWidth, messageHeight);
    roundedRectangle *view = [[roundedRectangle alloc] initWithFrame:messageFrame x:0 y:0 Width:messageWidth Height:messageHeight cIndex:0 radius:10.0f positionIndex:0];
    CGRect frameOut = CGRectMake((localContainerView.bounds.size.width/2)-(messageWidth/2),localConta inerView.bounds.size.height+messageHe ight, messageWidth, messageHeight);
    UILabel *mylabel = [[UILabel alloc] initWithFrame:CGRectMake(PostListViewXOFFSET, PostListViewYOFFSET, messageWidth-40,20)];
    mylabel.font = [UIFont fontWithName:@"Helvetica" size:12];
    mylabel.textColor = [UIColor blackColor];
    mylabel.text = inMessage;
    mylabel.backgroundColor = [UIColor clearColor];
    self.messageLabel = mylabel;
    [view addSubview:mylabel];
    [mylabel release];
    view.frame = frameOut;
    self.messageView = view;
    [self.view addSubview:view];
    [UIView beginAnimations: nil context: nil]; // Tell UIView we're ready to start animations.
    [UIView setAnimationDelegate: self]; // Set the delegate (Only needed if you need to use the animationDid... selectors)
    [UIView setAnimationDidStopSelector: @selector(animationDidStop:finished:context:)]; // example of a selector called with context when animation finishes.
    [UIView setAnimationCurve: UIViewAnimationCurveEaseInOut];
    [UIView setAnimationDuration: 2.0f]; // Set the duration to 4/10ths of a second.
    CGRect frameIn = view.frame; // Get the current frame.
    frameIn.origin.x = (localContainerView.bounds.size.width/2)-(messageWidth/2); // Move the view completely on screen.
    frameIn.origin.y = localContainerView.bounds.size.height-(messageHeight+20.0f);
    view.frame = frameIn; // set the new frame
    [UIView commitAnimations]; // Animate!
    [view release];
    - (void)animationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context
    self.transitioning = FALSE;
    [self HideMessage];
    - (void)HideMessage
    NSInteger messageWidth = 150;
    NSInteger messageHeight = 60;
    UIView *localContainerView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
    CGRect frameOut = CGRectMake((localContainerView.bounds.size.width/2)-(messageWidth/2),localConta inerView.bounds.size.height+messageHe ight, messageWidth, messageHeight);
    [UIView beginAnimations: nil context: nil]; // Tell UIView we're ready to start animations.
    [UIView setAnimationDelegate: self]; // Set the delegate (Only needed if you need to use the animationDid... selectors)
    [UIView setAnimationDidStopSelector: @selector(clearMessageView)]; // example of a selector called with context when animation finishes.
    [UIView setAnimationCurve: UIViewAnimationCurveEaseInOut];
    [UIView setAnimationDuration: 2.0f]; // Set the duration to 4/10ths of a second.
    self.messageView.frame = frameOut; // set the new frame
    [UIView commitAnimations]; // Animate!
    }

    To all,
    I have a question about how to handle the asynchronous call when a UIView animation is created. My setup is as follows. I have a method in a view controller that get user input from and then makes external http calls. Since the calls could take a few seconds I wanted to notify the user when the call started and ended. In order to show this message I created a simple animation block in a method which I will list below.
    The animation simply slides a box up with a label on it and then slides it back down. A pop up slider if you will.
    This is my method which does the http processing simplified down.
    My problem is that since the animation call is asynchronous the and takes 4 seconds total to complete. If the HTTP processing takes less then 4 seconds (at times it does) the next displayMessage is called and my animation gets screwed up.
    The thoughts I have had were to have a check to see if the animation was running which is set true in the pop up reveal and false in the popup hide. Then I could simply sleep my thread if the boolean was true. But this wasn't working since the animation stop block was never called.
    I need to bounce ideas of you guys cause I don't know how to get past this basic problem.
    - (void)loadPostViewController:(id)sender
    [self displayMessage:@"Parsing address"];
    //Actual http processing code here which invokes external service
    [self displayMessage:@"Address processed"];
    - (void)displayMessage:(NSString *) inMessage
    CGFloat PostListViewXOFFSET = 20.0f;
    CGFloat PostListViewYOFFSET = 20.0f;
    NSInteger messageWidth = 150;
    NSInteger messageHeight = 60;
    self.transitioning = TRUE;
    self.view.userInteractionEnabled = NO;
    UIView *localContainerView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
    CGRect messageFrame = CGRectMake(0,0,messageWidth, messageHeight);
    roundedRectangle *view = [[roundedRectangle alloc] initWithFrame:messageFrame x:0 y:0 Width:messageWidth Height:messageHeight cIndex:0 radius:10.0f positionIndex:0];
    CGRect frameOut = CGRectMake((localContainerView.bounds.size.width/2)-(messageWidth/2),localConta inerView.bounds.size.height+messageHe ight, messageWidth, messageHeight);
    UILabel *mylabel = [[UILabel alloc] initWithFrame:CGRectMake(PostListViewXOFFSET, PostListViewYOFFSET, messageWidth-40,20)];
    mylabel.font = [UIFont fontWithName:@"Helvetica" size:12];
    mylabel.textColor = [UIColor blackColor];
    mylabel.text = inMessage;
    mylabel.backgroundColor = [UIColor clearColor];
    self.messageLabel = mylabel;
    [view addSubview:mylabel];
    [mylabel release];
    view.frame = frameOut;
    self.messageView = view;
    [self.view addSubview:view];
    [UIView beginAnimations: nil context: nil]; // Tell UIView we're ready to start animations.
    [UIView setAnimationDelegate: self]; // Set the delegate (Only needed if you need to use the animationDid... selectors)
    [UIView setAnimationDidStopSelector: @selector(animationDidStop:finished:context:)]; // example of a selector called with context when animation finishes.
    [UIView setAnimationCurve: UIViewAnimationCurveEaseInOut];
    [UIView setAnimationDuration: 2.0f]; // Set the duration to 4/10ths of a second.
    CGRect frameIn = view.frame; // Get the current frame.
    frameIn.origin.x = (localContainerView.bounds.size.width/2)-(messageWidth/2); // Move the view completely on screen.
    frameIn.origin.y = localContainerView.bounds.size.height-(messageHeight+20.0f);
    view.frame = frameIn; // set the new frame
    [UIView commitAnimations]; // Animate!
    [view release];
    - (void)animationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context
    self.transitioning = FALSE;
    [self HideMessage];
    - (void)HideMessage
    NSInteger messageWidth = 150;
    NSInteger messageHeight = 60;
    UIView *localContainerView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
    CGRect frameOut = CGRectMake((localContainerView.bounds.size.width/2)-(messageWidth/2),localConta inerView.bounds.size.height+messageHe ight, messageWidth, messageHeight);
    [UIView beginAnimations: nil context: nil]; // Tell UIView we're ready to start animations.
    [UIView setAnimationDelegate: self]; // Set the delegate (Only needed if you need to use the animationDid... selectors)
    [UIView setAnimationDidStopSelector: @selector(clearMessageView)]; // example of a selector called with context when animation finishes.
    [UIView setAnimationCurve: UIViewAnimationCurveEaseInOut];
    [UIView setAnimationDuration: 2.0f]; // Set the duration to 4/10ths of a second.
    self.messageView.frame = frameOut; // set the new frame
    [UIView commitAnimations]; // Animate!
    }

Maybe you are looking for

  • Question about DPI & IE7

    RE: IE7 on WinXP In IE7, take a look at www.nypost.com (specifically the masthead and the nav bar) with a DPI of 96DPI. Everything looks fine. Now look at it with 120DPI. AHHHHHHH. How, as web designer, do I handle this?!? The NAV bar is suddenly too

  • Deployment of SQL Server Business Intelligence Development Studio (2008 R2)

    Looking for some guidance on deploying SQL Server Business Intelligence Development studio (2008 R2).  I have a requirement from our Data Warehouse developers, and they require the SQL Server Business Intelligence Studio deployed to the server that

  • Customer Service Fails Again

    I'll start by saying my experience with Verizon customer service has never been stellar.  Last year in (July 2012) my iPhone 4 died in a horrible gatorade accident.  I did not have insurance, so I added a line to my family plan and got a new iPhone 4

  • Plugin database access to calendar

    I am developing Web pages, which show a calendar of events by month. I have developed a simple JSP calendar and am wondering how I would go about plugging it into database I have experience of using JDBC to connect to database. The problem I have is

  • Forecast Mismatch in DP and SNP

    Hello all, Currently we are in SCM 4.0. When we release the forecast from DP to SNP, there is a mismatch in the forecast if the monthly buckets are selected and the forecast matches for weekly buckets. Can anyone please help me out on this. Thanks, S