Skip to main content

Posts

Color status bar on iPhone

This is just a quick tip with some basic logic on how to get a colored status bar on an iphone app ,here i will be assuming that the app does not rotate so i will be placing all the code in appdelegate in the - ( BOOL )application:( UIApplication  *)application didFinishLaunchingWithOptions:( NSDictionary  *)launchOptions So the secret is really that there is no secret ,apples framework does not allow you to choose the color of the status bar so instead we set the status bar to the translucent  predefined style of  UIStatusBarStyleBlackTranslucent  and then we draw a colored view behind it to make it appear as though the color of the bar has changed. Here is a sample where i "tinted" the statusbar cyan in the app delegate : - ( BOOL )application:( UIApplication  *)application didFinishLaunchingWithOptions:( NSDictionary  *)launchOptions {         [[ UIApplication   ...

Using delegates in Objective-C

Why use delegation? Well when writing Objective-C programs in Xcode we are encouraged to use the MVC(Model View Controller) structure.In MVC a model cannot send messages directly to a specific controller.This can become a problem if data in your model changes independantly and you need to update this information in your view via the controller(The model must never communicate directly with the view).This is where a delegate comes in,it allows messages to be sent from the model to a controller that is not specified in the model but is rather specified by the controller,in other words the controller specifies itself. If you dont really understand what im talking about so far ,don't worry.I didn't understand delegates either until I needed one,but hopefully by the end of this tutorial you will understand not only how to use a delegate ,but the reason you would want to use one. Program breakdown For this tutorial we will write a program that has a model that will change an...

Lion's eat RAM's

I recently purchased a Mac-mini(Yes I own a Mac now) with relatively the same hardware specs as my(well the one I work with) MacBook pro, Intel Core i5,Graphics 3000(or whatever) etc. The only difference being that the ram in the Mini was only 2GB and the Laptop has 4GB,we will come back to this later. The MacBook Pro experience: My experience with the laptop has been great,never lagging and I really got used to using a track-pad instead of a mouse and found gestures very helpful for quick desktop management with a small screen.It was also very responsive and I keep tons of windows open all the time without problems.  When I got my Mac Mini,I popped it out of its box and plugged it in to my standard PC peripherals,switched it on and everything worked fine ,I got a few nice surprises too,I did not expect it to come with a wireless card or built in Bluetooth,just like it does on the MacBook. Then I tried to run Safari,iTunes and Xcode all at once(I do this often while worki...

The World’s best operating system

This is a debate that has waged since the beginning of the three major operating systems, namely Microsoft Windows, The Mac Operating system and the many variations of Linux. For the purpose of this post I will be comparing using the latest versions, so that is Microsoft Windows 7, Mac OSX Lion and well, Linux is Linux. Microsoft Windows is the operating system everybody should be familiar with, it’s pretty much what people grow up with and become used to, when you buy a pc, it more than likely comes with windows, you don’t get pc games, you get “games for windows”, plus the average person’s question when they see Linux on your pc is “What windows is that?”. Up until now though, I have never been happy with windows, there were always error messages and viruses and just general slowness and inefficiency. But from the moment I saw windows 7, I liked it, not only did it look good, but it performed well and I was able to use it for months without a single error, I nicknamed it Windo...

Skyrim

Out of all the games I was anticipating in 2011, The Elder Scrolls: Skyrim  (Kelle: Keizaal in the Dragon tounge) was strangely not one of them.This was because I hated Oblivion and expected Skyrim to be the same.  I was very,very wrong. There were actually only two reasons I hated Oblivion, but they deterred me from actually attempting to finish the game.Reason one was that the inventory used illogical little icons and was as intuitive as Quantum mechanics(I to this day don't know how to drop an item in Oblivion) .Reason two was aesthetics,the people are the ugliest collection of creatures ive seen in a game,and thats just the humans... And then theres the water,lets just say it filled my head with strange thoughts of water coolers in the Bethesda office being filled with a strange matte blue liquid. In Skyrim they fixed it all ,everything is beautiful ,and finally someone got it into thier head that words are alot more intuitive than silly little pictures (they even ...

Using The AeroGlass library

AeroGlass Library Version 1.2 Contents: ·          Usage with Windows forms ·          Usage with WPF forms The AeroGlass library accesses the dwmapidll to extend the frames of windows for use with the C# language, this gives the effect of having more glass areas on a window or making a window look as if it is completely glass. The library aims to make implementing this method easier so that you can achieve this effect with minimal code and will not have to access the dll yourself,version 1.2 of the library is compatible with both windows forms and WPF forms, though the implementation differs slightly. This documentation covers the implementations of both types. Usage with windows forms There are 2 ways of implementing glass on a Windows form using the AeroGlass library, one is to use the GlassPane controls AutoExtend property and the other is to use code, let us first take a...