Fix Apple aluminium ultraflat keyboard

I have had a little issue with my Apple aluminium ultraflat keyboard: I used some cleaning foam to make it shine, and there must have been more liquid than foam on my tissue… and some must have gone to the ‘L’ key…

I faced the following issue after plugging my keyboard back: the ‘L’ key was acting like it was pushed, so as soon as the keyboard was plugged it started typing llllllllllllllllllllllllllllllll… and so on. Typing another key stopped it, but then no way to make the ‘L’ key work anymore.

After having tried to blow on the unmounted key, unmount the mechanism, have some water on it, nothing made it, it was still not working. Finally, I ended up sinking the whole keyboard in water, leaving it there for approx. 2 hours, hoping the product would be gone. After 1 week drying quietly not far from the heater, it was working again as before!

Since during my first repairing trial I kind of broke some part of the mechanism, I had to exchange two keys (my broken ‘L’ with the never-used-number-pad-lock-key). To prevent this, please find a video (sorry voice and subtitles are in French) explaining how to unmount the key and the mechanism without broking it.

Retain your IB objects in Cocoa Touch

I previously published 2 articles on the fact that you had to retain your objects instantied from Interface Builder. I finally discovered the scientific explanation within an AdMob source file:

Note that top level objects in nibs other than MainWindow.xib in Cocoa Touch are autoreleased, not retained like in OS X. Be sure to use [self retain] in -awakeFromNib when part of a custom nib (as in this example).

Extract from the AdMob SDK source files for iOS.

Automatically restart an app having started a call?

This post will be quite simple. Its goal is to answer this question : is there a way to automatically restart an app which has initiated a call, once this call ended? This question is pretty related to my own apps (I hope you already know them! if not, just check them in the AppStore! most are free!), since these are phone shortcuts (naturally just a little advertising picture below…).

My iPhone shortcut apps

So I recently checked to determine if I may make my apps a little more better, by allowing the user to have them restarting after the call ended. And the answer is… yes… but… this involves doing something which is not really nice in my case. In fact you can do this through using a WebKit view, and having a phone URL displayed in it. Having the user clicking this URL will bring a confirmation alert, if the user goes on the call takes place, and once it finished the app is restarted (you can Google this to find more details, I will not since I did not use this trick, doesn’t match my user experience goal!).

And that’s all! There is no other way, so if you don’t rely on a click on a link to start a call, do not hope to have your app restarting. iOS is not doing this… anymore (I remember it did in its first versions… it’s a shame it’s not customizable).

Have fun!

From Twitter to all your social web places, but filtered

Slide from Twitter to social web places.001
Uploaded with Skitch!

This shows how to update major social networking websites with your tweets, using #hashtags to prevent feeding your friends with boring work updates!

The icons can be found on the following authors’ sites:

Thanks to them!

Categories: Networking Tags: , , , , ,

Close this Number Keypad I shall not see!

  • Did you ever use an iPhone app with a Number Keypad to edit numbers only fields?
  • Did you ever wonder how you could close the keypad, just like you would do with the standard keyboard and its ‘Done’ button?
  • Are you sure you want to know the answer…?

YOU CAN’T! (at least if the application just used the standard Number Keypad provided within iOS SDK)

So, what choice do you have?

  • Generally, the keypad closure is not really necessary, since the edited field is in its own screen, you just let the user go back (generally through the navigation bar) and the keypad is closed automatically.
  • You may imagine other solutions, too…
  • But the one I’ll give you here offers the following result:
Simulateur iPhone
Uploaded with plasq‘s Skitch!

Now that you’ve seen this, you wan’t to know how to do it, don’t you? So here’s the howto! It’s not my own creation, I followed their tutorial and used the graphic files provided, so you can do so! I just poured a little bit of idea I found on another blog to make it a little more better (to me at least).

So this idea is just to use the powerfulness of Cocoa’s categories (extending classes without subclassing), to add a method to the UIView class enabling me to find the firstResponder from a view and resign it. Calling this method on the app’s main window when I want to close the keypad, it will seek and find the firstResponder, resign it, and thus close the keypad! Easier, isn’t it? And the corresponding is below…

#import 

@interface UIView ( RoCHExtensions )
- (UIView *)findAndResignFirstResponder;
@end

@implementation UIView (RoCHExtensions)
- (UIView *)findAndResignFirstResponder {
    if (self.isFirstResponder) {
        [self resignFirstResponder];
		return self;
    }

    for (UIView *subView in self.subviews) {
        UIView *firstResponder = [subView findAndResignFirstResponder];

        if (firstResponder != nil) {
			[firstResponder resignFirstResponder];
			return firstResponder;
        }
    }

    return nil;
}
@end

Now more community sharing!

I just activate old and new functions with WordPress:

  • Rating on posts and comments, so do not hesitate to tell what you like, and what you don’t!
  • Sharing links to share posts with your friends on Twitter, Facebook and many more!

Enjoy the community!

Categories: Blog life Tags: ,

Make Wireshark work on OS X

You just have to make the BPF file of libcap readable with the following command (in your terminal):
sudo chown {your account name} /dev/bpf*

Original tip source

Categories: Mac OS X Tips Tags: , , ,
%d bloggers like this: