UIImageView alpha fade animation issues

I'm a newbie iPhone developer going very well, almost finished my first app minus this one issue which I am a little embarrassed to be asking but...
I have a UIImageView that I have animated to fade (alpha value) over the period of 60s. After the animation a UIButton displays. In addition by tapping you can force the alpha value of the UIImageView down as to make the animation appear faster. But I am having trouble determining when the alpha value of my UIImageView is below zero - so that I can display the button - even though the animation is still running. Here is my code:
- (void)fadeTheImageView
[fadeImageView setAlpha:1.0];
[UIView beginAnimations:@"theAnimation" context:NULL];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(yourAnimationHasFinished:finished:context :)];
[UIView setAnimationDuration:10];
[fadeImageView setAlpha:0.0];
[UIView commitAnimations];
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
if ( fadeImageView.alpha <= 0.0 ) {
[saveButton setHidden:NO];
[fadeImageView setAlpha:(fadeImageView.alpha - 0.1)];
- (void)yourAnimationHasFinished:(NSString *)animationID finished:(BOOL)finished context:(void *)context;
[saveButton setHidden:NO];
The error is with the if ( fadeImageView.alpha <= 0.0 ) {
incompatible variable types.
I've tried everything.
Any help would be appreciated

I've worked around the problem.
What I have done is to animate the alpha of the button along side the UIImageView.
So no need to rely on that conditional.
- (void)fadeTheImageView
UIImage *fadeImage = [UIImage imageNamed:@"Base.png"];
fadeImageView.image = fadeImage;
[fadeImageView setAlpha:1.0];
[saveButton setHidden:NO];
[saveButton setAlpha:-10.0];
[UIButton beginAnimations:@"saveButton" context:NULL];
[UIButton setAnimationDuration:30];
[saveButton setAlpha:1.0];
[UIButton commitAnimations];
[UIView beginAnimations:@"theAnimation" context:NULL];
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(yourAnimationHasFinished:finished:context:)];
[UIView setAnimationDuration:30];
[fadeImageView setAlpha:0.0];
[UIView commitAnimations];
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
[saveButton setAlpha:(saveButton.alpha + 1.0)];
[fadeImageView setAlpha:(fadeImageView.alpha - 0.1)];
- (void)yourAnimationHasFinished:(NSString *)animationID finished:(BOOL)finished context:(void *)context;
[saveButton setAlpha:1.0];

Similar Messages

  • IOS/AIR GPU accelerated Alpha Fade Problem

    When I alpha fade a displayobject using Greensock with GPU acceleration enabled on an Adobe Air iOS app, objects will flicker at full opacity just as the entire object somewhere near the end of the fade to 0 alpha. I find this flickering occurs even when I don't fade to 0 alpha, and only on objects that are fading out (rather than fading in). The problem also seems to be specific to objects with TextFields (I use classic TextFields).
    Any thoughts as to why this is happening and what I can do about it?
    Kevin

    Would you consider this issue the same as this bug?
    https://bugbase.adobe.com/index.cfm?event=bug&id=3687958

  • [SOLVED] XFCE Slideshow Wallpaper - Fade animations

    Dear forums
    As the title says, I wonder if there is any way to get nice fade animations like in Gnome or KDE for XFCE. I remember there being an inbuilt option in XFCE making it possible to select some images which would be cycled through, but other than using e.g. Variety on Ubuntu, there is no animation when the wallpaper changes. Does this depend on some library? Could it be that Ubuntu has a configuration which makes it possible to use those animations automatically in XFCE too?
    I'm seriously considering leaving Ubuntu for good and use Arch Linux again, but since I'm using my Computer every day, I'd like my Desktop to look pretty.
    Thanks in advance!
    Last edited by alexftw (2014-03-16 04:43:48)

    twelveeighty wrote:http://www.linuxjournal.com/content/cre … ounds-xfce
    This only explains how to get a slideshow with xfdesktop, I know that already. My question was how to get fancy animations when the wallpaper changes.
    progandy wrote:You could try shantz-xwinwrap-bzr to force a window in the background.
    What a coincidence, I just figured that out myself!
    In case anyone will need this:
    xwinwrap -b -fs -sp -fs -nf -ov -- feh --bg-fill /path/to/your/wallpapers/
    xwinwrap will say that feh died but the exit code is 0 so there's nothing to worry about (does feh run as a daemon in the background?). Fade duration is specified by the compositor itself (now the only thing that'd make it perfect would be making compton use a longer fade duration on feh only), for automatic switching I'll use this for now, file "wallpaper_randomizer":
    #!/bin/bash
    while true; do
    xwinwrap -b -fs -sp -fs -nf -ov -- feh --randomize --bg-fill /home/alexander/Bilder/Wallpapers/
    sleep 600
    done
    chmod +x wallpaper_randomizer
    I'm using the XFCE settings to start it automatically, but adding it to .xinitrc would probably work too (useful if not using XFCE):
    compton -b &
    /path/to/wallpaper_randomizer &
    exec start_xfce4
    That makes me really happy somehow. Thank you, progandy, that would've really helped me if I've given up searching for a solution already.

  • Fallout 2 problems - NOT fade out issue

    Hi
    I recently wanted to run fallout 2 , so i installed it without any problems and run with wine.(0.9.19)
    Everything is okay ,fade out issue doesent exist horray
    but i have other problem - mouse pointer. In menus everything is okay ,but in game mouse pointer acts weird ,it is hery hard to move it.Impossible to play
    It is weird because when i turn on menu in game pointer run normally ,it acts good even when it is at lower side on the screen in game(where weapons are shown ,etc)
    I have tried various remedy but none works ,on wine db ,noone solved this problem.
    Anyone run into this problem ,any solution ? 
    PS.in cedega game is unplayable beacause of fade in out problem even after renicing ,but pointer acts good so it is definately wine problem

    I havent played fallout in a long time so i don't know if it has this option but check for hardware/software mouse pointer. Maeby that setting will solve the issue.

  • CR for VS2010 - Progress animation issue

    Hi,
    We are in the software business for years.Till last year, our software was windows application. Now we are releasing the web interface for it. In our windows application we use crystal report for reporting. We have registered license for crystal 8.5 and 11. Now for the web, we are planning to use the same crystal features.
    We downloaded CR for VS2010 and we changed configuration and everything. We tried to launch a report without parameters, it is working fine. When we trying to run a report with parameter it will show parameter popup and after giving parameter values when we press OK button it will show a progress animator and it will not close. This is what happening while pressing Next and Previous button. For Export button it is not showing any progress animation and it is working fine.
    NB:
    1.   We are developing reports using CR 11. The same report we are using for our Windows application and web application.
    2.   Our windows application is developed in VDF and front end and SQL server as backend. We are using CR 11 SDK in windows application. It is working fine.
    3.   Our web application is developed in VS2010, SQL server and CR4VS2010, which is showing progress animation issue as mentioned above.
    4.   We changed CR2VS2010 to CRXIR2 for VS2005 it was working fine. We have issue only with CR4VS2010.
    We are about to release our web application soon, so before releasing we want to buy the redistribution license for CR4VS2010 if there is any solution for this issue otherwise we need to think about CRXIR2.
    Thanks
    Baby C S

    Hi Ludek,
    As you mentioned I created a sample web application, it is working fine.
    But when I change the code as below it will show the problem.
    CrystalDecisions.CrystalReports.Engine.ReportDocument doc = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
    doc.Load("C:\Program Files\.......\Report1.rpt");
    this.CrystalReportViewer1.ReportSource = doc;
    Response.Write("Ok");
    While debugging I found the last statement Response.Write("Ok"); is causing the issue. If we remove that statement and run it will work fine.
    In our actual program we have created a class by inheriting ReportDocument and we are doing all the actions like assigning SelectionFormula, setting Database connection, dynamically assign values for some formula fields in the reports. (These all are part of customisation of our CrystalLayer). Just for a debugging purpose we put a Response.Write in our CrystalLayer class. That caused the issue. Now we removed it and it is working fine.
    NB: This issue was not there in CRXIR2. I think the progress animation is using some javascript and the Response.Write we are using in our program not allowing that animation to stop.
    Thanks
    Baby C S
    Edited by: babycs on Jan 19, 2011 5:05 AM
    Edited by: babycs on Jan 19, 2011 5:06 AM
    Edited by: babycs on Jan 19, 2011 5:20 AM

  • Creating Native InDesign Animation Issue

    Hello,
    I've been following Bob BringHurst's DPS Tips apps on "Creating Native InDesign Aninmation". In Indesign CS5.5, I've created a very simple animation using the custom preset "Fade in", and exported it to  a .fla file
    I then downloaded the CreateJS Toolkit. I didn't have Flash Pro so downloaded the trial of Flash Professional CC. CreateJS did not install due to Flash being a later version.... I've now read that this version of Flash has the toolkit built in anyway. Is this correct??
    However, when I open my .fla file in Flash Professional CC there is nothing displayed apart from a white box, so I download Indesign CC thinking it may be an incompatibility issue, and created the same animation and exported the .fla file as before.
    When opening in Flash CC I see the same result.
    In the DPS tips it states export to HTML5 but I dont see this option in Flash CC.... export to Image/Video/Movie only.
    Any help greatly received.
    Regards,
                   Iain...

    Yes, CreateJS is built in to Flash Pro CC. In Flash Pro CC, choose Command > Publish for CreateJS.
    As Bob said, that CreateJS workaround is useful only when you've created an elaborate native animation in InDesign that would be time-consuming to rebuild using a different app. If you're starting from scratch, use Edge, Photoshop, After Effects or another app to build an image sequence.

  • Safari - Animated GIF not Animating Issue

    I am frequenting site and have noticed animated gifs not animating properly on this page. The site is http://www.woot.com
    Problem Detail:
    There are two "whirly lights" on each side of a progress bar under the item currently for sale. The left light starts to animate while the page is loading but stops while the right light continues its animation.
    This particular site may usually only uses these images every once in a while so if no one checks this in the next couple days the images will no longer be there. I created a web archive the site which I could send if this page does go away. The issue does not happen in Firefox or Internet Explorer.

    Hi and Welcome to Apple Discussions
    I get the same effect as you in Safari. Loaded with no problem in Firefox. Page does have coding errors, which can lead to inaccuracies in how the page is rendered. Safari is much more strict about correct coding than Firefox, adhering to web standards set out by Web Standards Project.

  • Animation issue in Adobe photoshop cs6

    This is an annoying issue within photoshop. I am working on an animation for a video and when I try to change the position of a charater on a new frame it also changes the positioning on all of the frames previous of it.
    I am making a walk cylcle and  I want the character to walk from one end of the screen to the nextl but, when I make a new frame, move him to the opposite end of the screen on a NEW FRAME it changes the previous frames position to match the current one I am on.
    How do I fix this reoccuring problem.
    HERE IS A VIDEO DISPLAYING THE PROBLEM(Sorry, no mic):

    Read the help on how frame animation actually works.
    Mylenium

  • Fade Effect Issue with table structure

    I have an existing HTML page with a table framework that uses
    CSS divs in some of the table rows. My SPRY data is currently
    wrapped in DIV tags within the table. I've discovered that the
    table is screwing up the fade effect in IE7. Is there any way I can
    get around this without removing the table and recoding the whole
    page in CSS? FYI...I using version 1.4. I'm not sure if 1.5 will
    fix this issue.

    Essentially the fade in fade out effect isn't working at all
    in IE. It's setup as a slideshow and uses the fade effect as a
    transition between the spry data. The slideshow works fine just
    without the fade effect. Everything works perfectly in Firefox
    though. I know this code will work as we have used it before, the
    only thing different is that I have my DIV with the SPRY content
    wrapped within a table cell and row. I've read that the TR tag
    cannot be used, but it's not exactly using the TR as an ID. Once I
    comment out the table, tr, and td tags, the effect works no problem
    so I know it is the table. I can't give you the URL because it's on
    our local network.

  • Full res retina iPad and Edge Animation issues

    OK So I have been building folios for the new iPad (retnia) and the only way I can get a full page animation built in edge to work is to build it on a stage that is half res (1024x768). If I build a full screen edge animation (2048x1536) it just shows a blank screen on that page on the iPad. Anyone have any tips on this? The folio is built at 2048x1536. So when i place a 1024x768 oam file I have to stretch it and use "scale to fit". Although the animation works like this it is not as pretty as the full res pages that follow. Ideas?

    Alright. So I did a bunch of testing. Good news is that text created in indesign looks identical in quality regardless of if the indesign file is 1024 or 2048 when using PDF as the folio format. Bad news is that images (i.e. placed psd files) look not as great. Definantly better than when i was trying to upscale in folio Automatic from 1024 to 2048 but not as good as a indesign file created at 2048.
    Wish there was a way to solve the image quality issue. Oh and of course all the Edge animations work like a charm using PDF and 1024. They still are not as sharp or high quality as Edge animations built at 2048 but at least they work.

  • Powerpoint animation issue

    I'm losing animation on numbers that I have coming in at bookmarked places in a slide. I return to a home page and return to the slide no problem but if I return to homepage then a different slide, then home page and the initial slide...the animated numbers
    won't work. I believe (I guess) the page hasn't reloaded...but all the fixes I have seen for this problem I can't get to work with 2013. 1) they say add a blank slide before the problem slide and set the transition time to zero (well it won't let me set the
    transition time to zero...lowest it goes is 1 second...maybe thats why it won't fix the problem 2) install a macro to fix the problem...I have no idea how to actually do that? I've been trying to remedy this for weeks now...so if anyone can please please help...please
    do!
    Thanks
    Sue

    Hi Sue,
    Thanks for your question. I am not sure whether I have understood your situation correctly, but I'm unable to reproduce the issue according to above steps.
    If possible, please share the sample files with us, we will have a test on our end then. Also, better to provide the detailed steps on how to reproduce it.
    You can send the file to this email account:
    [email protected] and inform us here (the email subject should be the link of this thread).
    Thanks for your understanding.
    Regards,
    Ethan Hua
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Animation Issue in publish

    I imported flash animation movie in captivate. If I publish it with other slides, it does not work when I try to see it in browser, using F12 function. After I publish, final .swf file also does not work. Does it mean we can not import animation movie in captivate?
    Thanks

    Hi,
    We can insert animations in captivate and it should work.
    Is it possible to share that animation with us, so that we can check what the issue is?
    You can e-mail me to my e-mail address [email protected]
    Thanks,
    Vikranth.

  • Tween fade animation with buttons

    Hi, can anyone help me!
    I have four movie clips with instance names of "purple_ob", "green_ob", "orange_ob" and "blue_ob"
    and four buttons "purple_but", "green_but", "orange_but" and "blue_but"
    I want to have the movie clips automatically fade from one to another continually with a 5 second pause inbetween, but then if the user clicks one of the four buttons it will fade the relevant movieclip in. Then if nothing else is pressed the fading will carry on working through the four images in a loop.
    So far I have the movie clips fading on a button press but how do I implement the automatic fading from one MC to another?
    I've added the code below into the first frame of my scene
    //My actionscript 2.0 code
    import mx.transitions.Tween;
    import mx.transitions.easing;
    purple_but.onPress = function() {
    purple_ob.alpha = 0;
    purple_ob._x = 0;
    purple_ob._y = 0;
    var alphaTween:Tween = new Tween(currentPage, "_alpha", Strong.easeIn, 100, 0, 15, false);
    var alphaTween2:Tween = new Tween(purple_ob, "_alpha", Strong.easeIn, 0, 100, 15, false);
    var currentPage:String = purple_ob;
    purple_ob.swapDepths(thedepth += 1);
    green_but.onPress = function() {
    green_ob.alpha = 0;
    green_ob._x = 0;
    green_ob._y = 0;
    var alphaTween:Tween = new Tween(currentPage, "_alpha", Strong.easeIn, 100, 0, 15, false);
    var alphaTween2:Tween = new Tween(green_ob, "_alpha", Strong.easeIn, 0, 100, 15, false);
    var currentPage:String = green_ob;
    green_ob.swapDepths(thedepth += 1);
    orange_but.onPress = function() {
    orange_ob.alpha = 0;
    orange_ob._x = 0;
    orange_ob._y = 0;
    var alphaTween:Tween = new Tween(currentPage, "_alpha", Strong.easeIn, 100, 0, 15, false);
    var alphaTween2:Tween = new Tween(orange_ob, "_alpha", Strong.easeIn, 0, 100, 15, false);
    var currentPage:String = orange_ob;
    orange_ob.swapDepths(thedepth += 1);
    blue_but.onPress = function() {
    blue_ob.alpha = 0;
    blue_ob._x = 0;
    blue_ob._y = 0;
    var alphaTween:Tween = new Tween(currentPage, "_alpha", Strong.easeIn, 100, 0, 15, false);
    var alphaTween2:Tween = new Tween(blue_ob, "_alpha", Strong.easeIn, 0, 100, 15, false);
    var currentPage:String = blue_ob;
    blue_ob.swapDepths(thedepth += 1);

    Perfect!
    I removed the 'swapdepth' and it works perfectly now.
    thank you so much for your help, Ned!!!
    Below is the final code
    import mx.transitions.Tween;
    import mx.transitions.easing;
    var ob_array = new Array(purple_ob, green_ob, orange_ob, blue_ob);
    var ob_count = 0;
    var currentPage = purple_ob;
    var intervalID = setInterval(fadeOBs, 3000); // adjust the 3000 (3 secs) as desired
    green_ob._alpha = 0;
    orange_ob._alpha = 0;
    blue_ob._alpha = 0;
    purple_ob._x = 0;
    purple_ob._y = 0;
    green_ob._x = 0;
    green_ob._y = 0;
    orange_ob._x = 0;
    orange_ob._y = 0;
    blue_ob._x = 0;
    blue_ob._y = 0;
    function fadeOBs(){
          clearInterval(intervalID);
          intervalID = setInterval(fadeOBs, 3000);
          ob_count += 1;
          if(ob_count >= ob_array.length){
                ob_count = 0;
          var alphaTween:Tween = new Tween(currentPage, "_alpha", Strong.easeIn, 100, 0, 15, false);
          var alphaTween2:Tween = new Tween(ob_array[ob_count], "_alpha", Strong.easeIn, 0, 100, 15, false);
          currentPage = ob_array[ob_count];
    //Uncomment the line below if you want to increase the MC's depth
          //ob_array[ob_count].swapDepths(thedepth += 1);
    purple_but.onPress = function() {
          ob_count = -1; // one less than this
          fadeOBs();
    green_but.onPress = function() {
          ob_count = 0; // one less than this
          fadeOBs();
    orange_but.onPress = function() {
          ob_count = 1; // one less than this
          fadeOBs();
    blue_but.onPress = function() {
          ob_count = 2; // one less than this
          fadeOBs();

  • After Effects 4K Title & Animation Issue

    Hello,
    I am having an issue implementing titles for my project in PP that were created in AE. I had someone make me title animations and logo animations for me. He designed them for 1920X1080, but my footage and sequence is 4096 X 2160, and now he's on vacation for three weeks in Europe.  I have all the assets and project files for this project. I tried to do a simple change in the sequence settings of the comps but that didn't solve anything. I also tried scaling up the layers but then the animation paths got messed up. How can I re-size the titles so they match the sequence correctly?
    Thanks,
    Ben
    AE - 11.0.2.11
    MAC OS X - 10.8.3
    4K RED Footage - 4096 X 2160

    Check the comp resizer script that comes with AE and there's a similar, more advanced floating around on AEScripts or AEnhancers somewhere. Though the aspect ratios being slightly different you may still need to intervene manually. If ev erything is based on shape layers, vector artwork and text layers, enabling the collapse transformations switch might also allow scaling the pre-comps up without any loss of quality whiel retaining the animation...
    Mylenium

  • Adobe Edge 3 animations issues with webview on Android v4.1.1 and v4.2.1

    I am developing an Android App using webview (using phonegap/cordova v2.8.1 ) . I used Adobe Edge 3 and generated few animations using SVG images and couple of html pages
    Query #1:    Scaling of image is continously increasing with every orientation change
                 On Nexus 5,  Nexus 7 and Nexus 4 (all with Android version v4.4.2)  the Adobe Edge animations work as expected in my App, however there is one issue when ConfigChanges option in Android manifest file is set to  "orientation|screenSize" used in the main activity of my App to allow it to automatically resize this screen/images when screen orientations between portrait and landscape. This works but image size keeps increasing (never reset to original size) every time change the orientation of my Android device from portrait to landscape and vice versa.
    Is there any issue with Adobe Edge based animations w.r.t to automatically resizing based changes to screen orientation on Android ?
    Query #2:  Images(i.e. symbols) are incorrectly loaded/shown and sometime stage itself is not loaded
        On Samsung Tab 2 (v4.1.1) and Samsung S3 (v4.2.1), the same Android App runs fine, however some images are not loaded randomly, sometimes the image  is blank and sometimes incorrect symbols are overlayed onto the stage1 and stage 2 screens.
      Has body faced similar issues while using Adobe Edge generated animations with webview/phonegap based Android applications ? if yes how it was fixed ?
    This Android  App uses only the two html pages (as stage 1 and 2) and then it loads different symbols (i.e svg images) using hide and show , load composition methods to create animations.
    Let me know if there are any Adobe Edge 3 related issues specific to different version of Android  ...in particular  Android v4.0,  v4.1 and v4.2  ..because the same App works fine on Android v4.3 and v4.4
    I suspect it is due to differences and support available in webview implementations in different versions of Android.
    Any help on this is greatly appreciated !
    thanks
    Padua

    Sadly I don't have answers either. I'm not sure what happened but as of the last few days i've been having the same problems. There are also times when my mac mini wont even connect to the base station.
    What I find strange is that my sister has the same airport firmware installed and her machine is unaffected. I'm on hold with apple atm, so we shall see what they can figure out.

Maybe you are looking for