Recent Updates RSS Toggle Comment Threads | Keyboard Shortcuts

  • Ullrich 15:57 on 1. September 2010 Permalink | Reply
    Tags: , Framework, Mac, ,   

    Embedded Frameworks 

    When embedding frameworks to your Mac app there might be problems of finding a header file. There are two things to check for:

    • The framework needs to have @executable_path/../Frameworks as Installation Directory in it’s build settings
    • The app should include $(CONFIGURATION_BUILD_DIR)/$(CONTENTS_FOLDER_PATH)/Frameworks in it’s framework search path
    • (also make sure to have a Copy Frameworks build phase and that your famework is added to it)
     
  • Gernot 16:10 on 27. July 2010 Permalink | Reply
    Tags: ,   

    If you ever need to explain to a client why enabling iOS4 Multitasking is more than an entry in info.plist, point him to Doms list of non-obvious things to consider: http://cocoa-dom.tumblr.com/post/866039292/the-hidden-complexity-of-ios-4-multitasking

     
    • everydaypanos 14:56 on 7. August 2010 Permalink

      Why write code for “clients” when you can write for yourself. Plus you skip the annoying explanations to others.

      (I would like to suggest that you also use Rewrd as a Micropayments Service for your blog. Thx.)

  • Gernot 12:51 on 20. July 2010 Permalink | Reply
    Tags: iPhone Bughunting   

    Double Rainbow! 

    When you experience strange performance lags on an iPhone 4, make sure that your @2x images are *really* double the size of the original images. Especially if used in -colorWithPatternImage:

     
  • Ullrich 14:31 on 3. June 2010 Permalink | Reply
    Tags: Tools   

    Finder Toolbar Items 

    Did you know that you can add applications to your Finder toolbar? This comes in as a very handy shortcut because you can add context aware action scripts that do common stuff for you. Today I’m sharing 3 of them that help me through my days. :)

    • OpenInGitX  - This opens GitX with the currently opened folder. (Also make sure to check out brotherbard’s experimental GitX fork)
    • OpenInTextMate – As it says, it opens the currently selected files (or if non selected the currently opened folders) in TextMate.
    • OpenTerminalHere – This is the most useful. It opens Terminal.app with the current folder.

    You can download them here. It’s a good idea to extract them into your applications folder like so:

    To add them to your toolbar simple drag them there. That’s how my toolbar looks:

    The scripts/applications are based on this post but have been modified slightly. Let me know if you like’em :)

     
    • Emmanuel Paraskakis 14:32 on 7. August 2010 Permalink

      Just what I was looking for – Thanks!

  • Ullrich 17:17 on 20. May 2010 Permalink | Reply
    Tags: iPhone Voodoo ObjC   

    Finishing & canceling concurrent NSOperations requires to trigger KVO for isFinished and isCancelled.

     
  • Ullrich 13:31 on 19. May 2010 Permalink | Reply
    Tags: , WebKit   

    Prevent UIWebView from horizontal scrolling.

    HTML meta:

    <meta name = "viewport"
          content = "initial-scale = 1.0, user-scalable = no, width = 320"/>

    CSS:

    text-overflow: ellipsis;
    overflow: hidden;
     
  • Ullrich 11:21 on 10. May 2010 Permalink | Reply
    Tags: Coding Style,   

    No 1 in (serious) series of coding style posts: Private methods

    Declaring private methods in a class extension (like an anonymous category) rather than a named category makes the compiler warn you when those methods aren’t implemented.

    # MyClass.h
     
    @interface MyClass : NSObject {
    }
    - (void)publicMethod;
    @end
     
     
    # MyClass.m
     
    #include "MyClass.h"
     
    @interface MyClass ()
    - (void)privateMethod;
    @end
     
     
    @implementation MyClass
     
    - (void)publicMethod;
    {
        NSLog(@"public");
    }
     
    - (void)privateMethod;
    {
        NSLog(@"very private");
    }
     
    @end
     
    • Gernot 12:55 on 20. July 2010 Permalink

      Also: With the new Runtime, you can declare private ivars in a class extension. The new Runtime is available on the iPhone since 3.0 (might be 3.1 I’m not sure now) and on the Simulator of XCode 4.

  • Ullrich 13:02 on 26. April 2010 Permalink | Reply
    Tags: ,   

    If you want your subviews rendered before the alpha value is applied you can use the UIViewGroupOpacity Info Plist setting.

     
  • Ullrich 15:34 on 16. April 2010 Permalink | Reply
    Tags: ,   

    My list of breakpoints. Add them to your ~/.gdbinit

    fb -[NSException raise]
    fb -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:]
    fb -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
     
    fb NSKVODeallocateBreak
     
    fb _NSAutoreleaseNoPool
     
    fb -[_NSZombie init]
    fb -[_NSZombie retainCount]
    fb -[_NSZombie retain]
    fb -[_NSZombie release]
    fb -[_NSZombie autorelease]
    fb -[_NSZombie methodSignatureForSelector:]
    fb -[_NSZombie respondsToSelector:]
    fb -[_NSZombie forwardInvocation:]
    fb -[_NSZombie class]
    fb -[_NSZombie dealloc]
     
    fb szone_error
     
    fb objc_exception_throw
    fb malloc_error_break
     
    fb CGPostError
    fb malloc_printf
    fb _objc_error
    fb objc_exception_during_finalize_error
    fb auto_zone_resurrection_error
    fb auto_refcount_underflow_error

    UPDATE: added _NSAutoreleaseNoPool breakpoint to stop when there’s no autorelease pool but one is expected.

     
  • Ullrich 11:53 on 27. November 2009 Permalink | Reply
    Tags: ,   

    Use NSAssert(…) during development.
    But set NS_BLOCK_ASSERTIONS pre compiler flag for release.

     
    • toto 15:23 on 17. May 2010 Permalink

      NS_BLOCK_ASSERTIONS=1 Seems to be default in XCode 3.2

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
l
go to login
h
show/hide help
esc
cancel