Twitter tip - How to undo a retweet (web) Earlier in the morning I wanted to undo a retweet I did. It took me a while to figure out how to. Just posting it here for future use and for you who is reading this right now. 1. Find the tweet your retweeted. 2. Notice that the retweet link now says retweeted. 3. Click on it

You can make your NSViews auto arrange/resize according to its superview's size by setting appropriate values using NSView's setAutoresizingMask: method. For this example's sake I'll consider elements added as subviews to the contentView of the NSWindow. NSWindow can change its size when going into full screen, when the user clicks on the resize control (green button) and when the user ...

Sample code line 1: NSString *someString; line 2: someString = [self getStringValue]; line 3: NSLog(@"length of the string = %d",[someString length]); In the above example sometimes the code can crash at line 3. Possible reason would be that the object "someString" is either null or nil. null vs nil has always been a debate with my friends, when to use ...

Did you know that by using "removeItemAt:" method in NSFileManager you could actually delete the documents directory? It is bit of a scary thought and I sometimes feel that it shouldn't be the case to keep careless developers away from bugs, but unfortunately or not it is possible. A possible bug you will miss out because of poor validation would ...

Mac OSX Mountain Lion unidentified developer Looks like Apple is serious about provisioning and developer certificates for Mac apps from their latest Mac OSX version (10.8 - Mountain Lion). It has always being the case for iOS apps but not for Mac apps. Just got this error while trying to install Fink However the good news is that there still exists a work around. Unbelievably simple ...

Incorrect code sample UIImagePickerController *pickerController = [[UIImagePickerController alloc]init]; pickerController.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; pickerController.delegate = self; [self.navigationController.view addSubview:pickerController]; [pickerController release]; Actually there is nothing wrong with the addSubview method. The only problem is that it doesn’t load the gallery. In iOS 5 the gallery gets loaded without any issue. However if you want to make your app com

UINavigationBar default back button - iOS 5 It is common knowledge that the UINavigationBar will display the previous UIViewController's title in an arrow shaped button at the left hand side corner. Basically if the previous UIViewController doesn't have a title the back button won't be visible as well.This is annoying and I always thought that the best practise would have been to have the button with ...

I'm using ZipArchive developed by aish to create zip files. ZipArchive is an Objective-C class to compress or uncompress zip files, which is based on open source code "MiniZip". It worked fine on many of the iPhone apps I developed. However it does not support opening of an existing zip and adding more files to it. So I did this ...

UINavigationBar tintColor, why not backgroundColor or color? I don't know whether its just me but, whenever I'm thinking of changing the colour of an UI element first thing I would do is look for methods like setBackgroundColor or setColor before I think of subclassing the element and overriding its drawRect (for more customised application of colours you will have to override "drawRect"). Unfortunately in objective c UINavigationBar ...

Two things I like about facebook timeline I should say that I also some what agree with the buzz about how annoying the new timeline feature is. As it is said that facebook timeline is not going to be an optional feature anymore. Facebook will gradually turn all its user's profiles in to the timeline mode. However you will get 7 days trail period to recheck your ...

If the text is showing perfectly fine in other devices, first thing I would check is the font assigned. There is a small issue with the new Xcode version (version 4.2). Some of the fonts you get in the IB (Interface Builder) are not available in all iOS versions and devices. For example the font "Helvetica Neue Medium" is not ...

You can achieve this by setting an NSView to the NSStatusItem and getting its frame when needed. NSRect rect = [[[statusItem view] window ] frame]; statusItem is a NSStatusItem object. You can get the current item as follows, NSStatusBar *statusBar = [NSStatusBar systemStatusBar]; statusItem = [[statusBar statusItemWithLength:21]retain]; To handle any actions you will have to add a NSButton to this ...

If you are trying to find a way to make a NSWindow transparent then you should have a look at one of my earlier posts, titled "Draggable transparent NSWindow". Today I'm going to show you how to have the default NSWindow title bar controls (close,minimize,maximize). Step 01: Design images for the buttons. You require two sets of images, one set ...

Tuk Experience - Sri Lanka The current 'tuk-tuk' setup is a modification of a Japanese delivery vehicle popular in the '60s. Drivers operate the engine with a motorcycle style steering mechanism to guide the vehicles. Originally two-stroke engines, they are also available in four-stroke versions with delivery and pick-up models on offer as well. The name 'tuk-tuk' quaintly mimics the sound of their idling ...

You must be familiar with 'sectionIndexTitlesForTableView' method which allows you to define a list of shortcuts for your sections in an UITableView (like the iPhone contacts app). What if you want a similar behaviour without having any sections? This is how you could tweak apple's default behaviour of 'sectionIndexTitlesForTableView'. Implement the following methods in the delegate class of the UITableView. ...

Unlike in previous versions of Xcode accessing performance tools aren't straight forward in Xcode version 4. But if you follow the following steps, you would do just fine. 1. Go to edit schemes 2. Select Profile from the list to your left 3. Set the build configuration to debug 4. Select the instrument you want to run from the list ...

Top 4 mac icons apps Following are 4 awesome apps I came across as far as mac icons are concerned. Iconator - A recently released app with a cool user interface and over 100 icons to choose from CandyBar - An app by www.panic.com

Esala Perahera is the grand festival held in Kandy. It is very grand with elegant costumes. It has become a unique symbol of Sri Lanka. It is a Buddhist festival consisting of dances and nicely decorated elephants. There are fire-dances, whip-dances, Kandian dances and various other cultural dances. I was in there one week prior to the festival and didn't ...

Previous Page