Recent Updates RSS Hide threads | Keyboard Shortcuts

  • Stretchable Buttons in Cocoa (Objective-C)

    9:38 pm on September 13, 2011 | 0 Permalink

    Need a long button that stretches to your content? Well it’s really easy on the iPhone with the help of stretchableImageWithLeftCapWidth

    Create one image with a left and right caps. Note the width of these caps (make sure they are equal) and voila. So your image will have three parts a left cap, a center (stretchable area) and a left cap.

    UIImage *addButtonImage = [[UIImage imageNamed:@"greenButtonStretchable.png"] stretchableImageWithLeftCapWidth:17.0 topCapHeight:0];
    [addButton setBackgroundColor:[UIColor clearColor]];
    [addButton setBackgroundImage:addButtonImage forState:UIControlStateNormal];

    Need a better explanation of how this works? Let me know in the comments!

     
  • Run Code in Main Thread GCD (iOS Objective-C)

    1:17 am on September 13, 2011 | 0 Permalink

    Simple code to run UI Kit elements on the main thread.   If your working on a different thread and need to run a piece of UIKit code, just put it in between the braquets of this Grand Central Dispatch snippet.

    dispatch_async(dispatch_get_main_queue(), ^{
    // do work here
    });

    GCD is supported by iPhone 4.0+

     
  • jd/adobe: Adobe on "HTML5"

    11:05 pm on June 17, 2009 | 0 Permalink | Reply

    Sure. So I mean, to the extent that an improved HTML standard accelerates innovation and consistent reach for web content, we’re very supportive and clearly from the perspective of our tools, we will support the creation and management of HTML content to the level that they want.

    I think it speaks increasingly to the realization that rich Internet applications and delivering engaging experiences is increasingly important to all of our customers. I think the challenge for HTLM 5 will continue to be how do you get a consistent display of HTML 5 across browsers. And when you think about when the rollout plans that are currently being talked about, they feel like it might be a decade before HTML 5 sees standardization across the number of browsers that are going to be out there.

    So clearly supportive in terms of making sure as HTML 5 is evolving that we will support it in our web authoring tools but from the perspective of continuing to drive Flash and innovation around Flash and rich Internet applications, we still think that actually the fragmentation of browsers makes Flash even more important rather than less important.

    via jd/adobe: Adobe on “HTML5″.

     
  • Open the Mail app from a UIWebview

    8:58 pm on June 17, 2009 | 0 Permalink | Reply

    - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType;

    {

    NSURL *loadURL = [ [ request URL ] retain ]; // retain the loadURL for use

    if ( ( [ [ loadURL scheme ] isEqualToString: @”http” ] || [[ loadURL scheme ] isEqualToString: @”mailto” ] || [ [ loadURL scheme ] isEqualToString: @”https” ] ) && ( navigationType == UIWebViewNavigationTypeLinkClicked ) ) // Check if the scheme is http/https. You can also use these for custom links to open parts of your application.

    return ![ [ UIApplication sharedApplication ] openURL: [ loadURL autorelease ] ]; // Auto release the loadurl because we wont get to release later. then return the opposite of openURL, so if safari cant open the url, open it in the UIWebView.

    [ loadURL release ];

    return YES; // URL is not http/https and should open in UIWebView

    }

    via Open Links from a UIWebView in Safari – iDevKit.

    Now that was much easier than I thought it would be!

     
  • 2:11 am on June 17, 2009 | 0 Permalink | Reply
    Tags: Random

    Working on my writing. It’s important!

     
  • John Graham-Cumming: If you build it, they will ignore it

    11:56 pm on June 16, 2009 | 0 Permalink | Reply

    In many ways the hard part comes after you’ve created something.

    via John Graham-Cumming: If you build it, they will ignore it.

    Marketing has always has been tough for me. I love to create new stuff, I’ve always treated promotion like icing, not really necessary but it makes the cake delicious.

    As a developer to not market your product is like shooting yourself in the foot.  Rather than just icing here is a more appropriate analogy. It’s like building a great cake and not sending out any invitations for a party.   So here you are with your magnificent cake and no one knows about it.  Well at least YOU get to enjoy your cake…

    This is why so many developers fail on their own. Lets get our minds together and start promoting. Your engineering prowess will only get you so far in this life.

     
  • 10:37 pm on June 16, 2009 | 0 Permalink | Reply
    Tags: Software recommendation

    Tweetie on mac os x rocks! I definitely recommend it.

     
  • HTML5 > Flash + Silverlight (in the future anyway)

    7:32 pm on June 16, 2009 | 0 Permalink | Reply

    HTML 5, a groundbreaking upgrade to the prominent Web presentation specification, could become a game-changer in Web application development, one that might even make obsolete such plug-in-based rich Internet application (RIA) technologies as Adobe Flash, Microsoft Silverlight, and Sun JavaFX.

    via HTML 5: Could it kill Flash and Silverlight? | Developer World – InfoWorld.

    I can’t wait for this day.  Canvas needs to become much faster, video tags need to be made standard and working consistently across browsers and operating systems.

    This is going to take some time, more than a few years.  Flash has complete dominance over video on the web.  Rightfully so, it’s easy to use, and consistent.

     
  • 5:06 pm on June 16, 2009 | 0 Permalink | Reply

    We now have a twitter account! http://twitter.com/6angryapes so start following (please)!

     
  • 4:39 pm on June 16, 2009 | 0 Permalink | Reply
    Tags: Social

    That’s right, we’re the 6angryapes with a neutered ape logo.

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
esc
cancel