depicus

changing the digital world one bit at a time...

Blants (noun) the rants of a blogger

  1. Kenya Dairy iPad app goes Open Source

    July 1, 2011 by The Man

    You can find the source code on Github and the Kenya Diary app itself is on iTunes


  2. Scrolling credits on iOS – how to create.

    June 16, 2011 by The Man

    Ever wanted to have scrolling credits for your iOS device ? Here is how to do it…

    Scrolling Credits from Brian Slack on Vimeo.

    1. Take your existing photo and cut out a piece as high as your UIView and as wide as your text plus a little bit.
    2. This new image will be our mask.
    3. With the mask image cut out the centre so you have a rectangle top and bottom. Clone the layer and on the first layer delete the bottom rectangle, on the other layer delete the top rectangle
    4. Add a layer mask to both.
    5. With the layer mask selected add a black/white gradient (hold down the shift key to get a straight down gradient)
    6. Your mask image is now done, add to your XCode project with the main image then the text and then the mask image on top.
    7. To animate first reset the text so it’s always in the same starting position

    lblCredits.transform = CGAffineTransformMakeTranslation(0, 0);     
    CGRect frame = lblCredits.frame;
    frame.origin.y = 550.0;
    lblCredits.frame = frame;
    

    8. Then just animate up

    [UILabel beginAnimations:nil context:NULL];
    [UILabel setAnimationDuration:30.0f];
    [UILabel setAnimationCurve:UIViewAnimationCurveLinear];
    [UILabel setAnimationBeginsFromCurrentState:YES];
    [UILabel setAnimationDelegate:self];
    [UILabel setAnimationDidStopSelector:@selector(creditsHaveEnded)];
    CGAffineTransform transform = CGAffineTransformMakeTranslation(0, -1000);
    lblCredits.transform = transform;
    [UILabel commitAnimations];
    

    9. That’s about it, dependant on how you use it you may need to cancel the animation but I’m sure you can work that out 🙂


  3. XIB iPad orientation in landscape problem and solution

    January 26, 2011 by The Man

    If you want to show a secondary nib file you may have noticed that it shows fine in portrait mode but from startup not in landscape mode.

    This is what I use to fix this. Seems like a fudge but it works, I call this after creating the view.

    vSettings is a UIView and backGroundSettings is a UIImageView.

    
    - (void) animateFlipInView:(NSString *)theNib;
    {
        UIInterfaceOrientation toInterfaceOrientation = self.interfaceOrientation;
        NSArray *nibObjects = [[NSBundle mainBundle] loadNibNamed:theNib owner:self options:nil];
        vSettings = [nibObjects objectAtIndex:0];
        [self.view addSubview:vSettings];
        if (iPadCheck)
        {
            if ((toInterfaceOrientation == UIDeviceOrientationLandscapeLeft) || 
    			(toInterfaceOrientation == UIDeviceOrientationLandscapeRight)) 
            {
                CGRect contentRect = CGRectMake(0,0,1024,768);
                vSettings.bounds = contentRect;
                CGRect myFrame = vSettings.frame;
                myFrame.origin.x = 0.0;
                myFrame.origin.y = 0.0;
                vSettings.frame = myFrame;
                UIImage *image;
    			image = [UIImage imageNamed: @"Default-Landscape.png"];
                [backGroundSettings setImage:image];
    		}
        }
        [UIView beginAnimations:nil context:NULL];
        [UIView setAnimationDuration:1.0];
        [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.view cache:YES];
        [UIView commitAnimations];
    }
    

  4. iPhone App Giveaway

    December 14, 2010 by The Man

    I have 7 codes to give away for my Wake On Lan iPhone App. First come first serve. Leave a comment and hopefully if you used the right email address I will email you a code.

    Don’t forget to give us a review, good or bad, on the app store.

    UPDATE: ALL GONE


  5. WoL Monitor a hit ?

    December 4, 2010 by The Man

    Well the numbers are in for the first two days. To say I am a bit shocked would be an understatement as it seems 199 people thought it was an app they needed. This is strange as my WoL sender app gets about 6 downloads a day and has been live a month, clocking up 239 downloads so far.

    Looks like people want to monitor WoL more than they want to send WoL magic packets 🙂


  6. WoL Monitor for iPad and iPhone

    December 2, 2010 by The Man

    Well I has to make a video for Apple so you might as well see it as well.

    Wake On Lan Monitor from Brian Slack on Vimeo.

    Just a short video of my Wake On Lan monitor in action. No Oscars for this one.