Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Sep 3, 2012, 03:56 PM   #1
IDMah
macrumors regular
 
Join Date: May 2011
Fade no Curl.

Hi all.. approaching the home stretch.. but think I'm getting dumber..

trying to CurlDown an overlay.

with this.


Code:
-(void) showInfoScreen
{
    // Creates the info / Setting screen //
    // turn off timer //
    [self timerControl:PAUSETIMER];
   
    // UIView *infoView = [[UIView alloc] initWithFrame:CGRectMake(0,0,320,640)];
    //UIView *mainViewOverlay = [[UIView alloc] initWithFrame:CGRectMake(0,0,320,640)];
   
    UIImageView *popupView =[[UIImageView alloc] initWithFrame:CGRectMake(48.5,55.5,240,370)];   
   
    if (!overlayHelpScreen) {
        overlayHelpScreen = [[UIView alloc] initWithFrame:CGRectMake(0,0,320,640)];   
        [overlayHelpScreen setBackgroundColor:[UIColor clearColor]];
    }
    /*
    UIGraphicsBeginImageContext(self.window.frame.size);
    [[UIImage imageNamed:@"Scroll-paper_2.png"] drawInRect:self.window.bounds];
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    */
    [popupView setImage:[UIImage imageNamed:@"Scroll-paper_2.png"]];
    [popupView setAlpha:0.0];
    popupView.tag   = 501;
    //[overlayHelpScreen setAlpha:0.0];
    // animate the View on //
    [overlayHelpScreen addSubview:popupView];
    
    //[[self window] addSubview:overlayHelpScreen];
   
   // [[self window] addSubview:infoView];
    [[self window] addSubview:overlayHelpScreen];
    [self setAnimationPageCurl:popupView];

   // [popupView release];
    
}


//  UIView *overlayHelpScreen  in  MYGameAppDelegate.h 

- (void) setAnimationPageCurl:(UIImageView *)imageView {
    
    [UIView transitionWithView:imageView 
                      duration:1.5 
                       options: UIViewAnimationCurveEaseOut | UIViewAnimationOptionTransitionCurlUp 
                    animations:^ { imageView.alpha = 0.850; [UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:overlayHelpScreen cache:YES]; //<----- just guessing here } 
                    completion:nil];
}

so fade is fine. NO Curl action. 

thanks
Ian

So much for me thinking I understand blocks. :confused:
IDMah is offline   0 Reply With Quote
Old Sep 4, 2012, 02:26 AM   #2
jnoxx
macrumors 65816
 
jnoxx's Avatar
 
Join Date: Dec 2010
Location: Aartselaar // Antwerp // Belgium
You give your block the curlUp, and inside the executable code of your block, you set it to curldown..
I guess it's mega cofnused have you tried removing the curlDown, and just letting it curl down at the options?
__________________

iPad Mini, iPad 4, iPad 2, iPhone 3G,4,5, iMac 24", Mac Mini Last gen, Macbook Pro Retina with Dell U2711
jnoxx is offline   0 Reply With Quote
Old Sep 4, 2012, 01:53 PM   #3
IDMah
Thread Starter
macrumors regular
 
Join Date: May 2011
tired :

Code:
    [UIView transitionWithView:imageView 
                      duration:1.5 
                       options: UIViewAnimationOptionTransitionFlipFromLeft  
                    animations:^ { imageView.alpha = 0.850;// [UIView setAnimationTransition:UIViewAnimationTransitionCurlDown forView:overlayHelpScreen cache:YES];
                    } 
                    completion:nil];
Still no curl - or flipping love..

thanks
Ian
IDMah is offline   0 Reply With Quote
Old Sep 4, 2012, 03:28 PM   #4
samdev
macrumors regular
 
Join Date: Sep 2011
Quote:
Originally Posted by IDMah View Post
tired :
Still no curl - or flipping love..

thanks
Ian
You misspelled it.

Quote:
options: UIViewAnimationCurveEaseOut | UIViewAnimationOptionTransitionCurlUp

Use this instead:
Quote:
options: UIViewAnimationOptionCurveEaseOut | UIViewAnimationOptionTransitionCurlUp
samdev is offline   0 Reply With Quote
Old Sep 7, 2012, 02:53 PM   #5
IDMah
Thread Starter
macrumors regular
 
Join Date: May 2011
thanks for catching that but did nothing..

I added a remove curlUp, using this:

Code:
-(void)removeOverlay
{
 [[[self window] viewWithTag:216] setAlpha:BASEINFOALPHA];
    [self setAnimationPageCurlAway:[[self window] viewWithTag:216]];
}

-(void) setAnimationPageCurlAway:(UIView *)imageView
     {
         [UIView transitionWithView:imageView 
                           duration:0.5 
                            options: UIViewAnimationOptionCurveEaseOut|
                         UIViewAnimationOptionTransitionCurlUp 
                         animations:^ { imageView.alpha = 0.0;} 
                         completion:^(BOOL finished){[self removeInfoScreens];} ];
     }

almost identical code to the CurlDown works perfectly.. flummoxed !!!

I did Try calling:
Code:
[self setAnimationPageCurl:[[self window] viewWithTag:216]];
the same way but nada!!
I'm going with a fade in !!! UGH! !!!

thanks
Ian
IDMah is offline   0 Reply With Quote
Old Sep 7, 2012, 03:19 PM   #6
dejo
Moderator
 
dejo's Avatar
 
Join Date: Sep 2004
Location: The Centennial State
You should be running transitionWithView: on a container view (as described in the documentation) and not on the imageView itself. You should probably review the "Animations > Changing the Subviews of a View" section of the View Programming Guide for iOS.
__________________
dejo is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
gold 5s... will it fade? enthawizeguy iPhone 14 Sep 18, 2013 12:39 PM
File upload using curl. mycompuser Mac Programming 3 Jan 13, 2013 12:57 PM
iCal in Lion no longer uses page curl neutrino23 Mac Applications and Mac App Store 2 Nov 24, 2012 12:11 PM
Screensaver fade in/out Tea-Aholic OS X 0 Aug 17, 2012 10:46 PM
Install curl on ML dutchnewbie OS X 10.8 Mountain Lion 4 Aug 9, 2012 08:17 PM

Forum Jump

All times are GMT -5. The time now is 08:45 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC