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 you need to understand first 1. Branch condition : probably a if statement 2. Garbage value: Every variable has a garbage value prior to any initialisation "Branch condition evaluate to a garbage value" would probably mean that there could be an instance where your code (if statement in this case) tries to evaluate a variable/object which is not ...
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 ...
Christmas could be very interesting and eventful, especially if you have a Catholic girlfriend ;) Well, yeah, I’m going to be busy this season. I had a sneak peek at her oooloo yesterday and found it very interesting and sweet the way she has planned everything. Merry Christmas :)
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 ...
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 ...
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 ...
For all the geeks and not so geeky to read and comment :) 1. Rarely are they possessive. They trust you, so, you can be yourself when you’re around them. 2. You won’t have to worry about him ogling another girl. They’re more concerned with gadgets and PCs. Heehee. 3. You don’t have to worry about what he’s up to ...
Anybody who have used a UITextView in Objective C will know the select all option. For those who didn't understand, I'm talking about the select all option you get when you tap on a UITextView. Today I'm going to show you how to change its behaviour. First things first :) Did you know that you can programmatically select a range ...
In the iPhone app I'm developing these days there was this instance where I was required to have a search box on top of a table view and to show/hide when required. When the page loads I didn't want it, so I added the following in the view will appear method. [self.tableView setContentOffset:CGPointMake(0, 44) animated:FALSE]; 44 = height of the ...
In today's lesson I'll show you how you could pair your mac with a bluetooth device. A bluetooth device can be of any nature not necessary another mac. When paired you can send/receive files and even share common directories for file sharing. The following are few self explanatory screen shots which will guide you through the process. Find the bluetooth ...
The following code is an example for a way you could customize a NSMenu in Objective C. It will add customized list items to your NSMenu by setting NSAttributedString objects for the title of the NSMenuItems instead of NSString objects. //first you need a NSMutableDictionary to hold the attributes self.folderItemFormatDictionary = [[NSMutableDictionary alloc]init]; /*NSAttributedString class has lot of attributes you ...
In life sometimes shit happens. When they happen no point trying to figure out why. You can always find something to do about it. So when shit happen ask yourself whether you have done anything about it.
Well it is that time again where Asia is going to host cricket world cup. It will be Bangladesh's first time co-hosting a Cricket World Cup. Welcome to the club brothers :D The World Cup will take place between February and early April 2011, with the first match to be played ...