Archive for the ‘Uncategorized’ Category

Setting View to Landscape and Hiding Status Bar in iPhone

Friday, February 5th, 2010

If you were wondering how to start your application in landscape mode with the status bar hidden, you need to override two methods in your ViewController: viewDidLoad and shouldAutorotateToInterfaceOrientation.


// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[[UIApplication sharedApplication] setStatusBarHidden:YES animated:NO];
[super viewDidLoad];
}

// Override to allow orientations other than the default portrait orientation.
- (BOOL) shouldAutorotateToInterfaceOrientation: (UIInterfaceOrientation) interfaceOrientation {
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);
}

Interface Builder does not have “Class Outlets” any longer

Thursday, January 28th, 2010

I am not sure what happened, but Class Actions and Outlets got moved to a new location. They live now in the Library Window. To add Actions and Outlets to your class, first locate it in the Library (search for it), click and then select Outlets or Actions tabs.

xcode

Creating gradient background for iPhone Tab Bar

Sunday, January 24th, 2010

If you want to have a gradient on the background of your UITabBar in iPhone 3.0, it’s fairly easy.

Step 1: Create an image with width of 1px and height of 49px with a gradient of your choice. Save the image as png with the name of your choice (tabbar_back_.png).

Step 2: Add the image to your project.

Step 3: Extend UITabBarController. Assuming you already have Tab Bar Controller in your xib file, go to Xcode and create a new UIViewController subclass with the name of your choice (MyUITabController).
Change the header file to:
@interface MyUITabController : UITabBarController{}@end
Change the implementation file to:

- (void)viewDidLoad {
[super viewDidLoad];
CGRect frame = CGRectMake(0, 0, 480, 49);
UIView *viewWithColor = [[UIView alloc] initWithFrame:frame];
UIImage *backgroundImage = [UIImage imageNamed:@"tabbar_back_.png"];
UIColor *backgroundColor = [[UIColor alloc] initWithPatternImage:backgroundImage];
viewWithColor.backgroundColor =backgroundColor;
[backgroundColor release];
[[self tabBar] insertSubview:viewWithColor atIndex:0];
[viewWithColor release];

}

Save the project.

Step 4. Go to Interface Builder and select UITabBarController. Press Command+4 this should bring up Controller Identity Window. Select your new file name (MyUITabController) from Class Identity Class drop down. Save. Build and go!!!!!

Configuring Subeclipse with Flex 3

Friday, January 22nd, 2010

I have two computers one of which runs SVN. When I tried to access the SVN from a remote Flex Builder, it worked fine. Subeclipse on a local Flex Builder however was not able to connect and was giving me this error: error validating location.
The trick is to use local host to connect locally to the SVN with Subeclipse. In the url enter next – (protocol of your choice)://localhost/path_to_your_repository

No Flash CS5 Beta

Saturday, December 19th, 2009

Adobe decided to cancel Flash CS5 Beta. I wonder if it has something to do with Apple (being control freaks) freaking out about Flash CS5 being able to compile applications for iPhone.

SVG is alive and well

Sunday, December 13th, 2009

I have been working on a countdown timer for the 2010 New Years (work in progress) and decided to give SVG a try. And it works great in most browsers except IE of course. To work around this annoying limitation, I downloaded SVGWEB javascript library. This is an amazing library that detects IE and substitutes SVG with Flash.
Working with SVG is very easy since it becomes a part of your document DOM model. You can manipulate it with common used DOM methods: getElementById, getElementsByTagName and others.

HAPPY HOLIDAYS!!!!!

Tuesday, December 16th, 2008

One of the best articles on light

Tuesday, November 25th, 2008

Today I came across one of the best articles on light. I found it could be useful for both photography and 3D. read here.

My lights have arrived

Thursday, November 13th, 2008

I finally got my lights!!!!  I bought them from  B&H . 

I got a classic setup – one shoot-through umbrella, one softbox, two VSD300 300w DIGITAL MONOLIGHTS, one 100w MONOLIGHT and BACKGROUND PORT-A-STAND.

So now I can take some kick-ass photographs. :)

Obama is the 44th president of the United States

Tuesday, November 4th, 2008

Yes, We can!!! Congratulations to all Americans! I bet Europeans are peeing in their pants :-)