Category Archives: Mac

Samsung Year in Review: Galaxy Triumphs, Apple Losses

Samsung produces a number of products – from kitchen appliances to PCs – but it was the company’s mobile division that made the most headlines in 2012. The Korea-based company dominated the mobile phone space, introducing several new Galaxy devices throughout the year. But it couldn’t shake one its biggest rivals, Apple, which proved to… Read More »

Apple fined by China court for copyright violation

A court in China has ordered Apple to pay compensation to eight Chinese writers and two companies for violating their copyrights. They had claimed that unlicensed electronic versions of their books had been sold on Apple’s online store. The court ordered Apple to pay them 1.03m yuan ($165,000; £100,000) in compensation, according to the official… Read More »

How to find your Google Plus ID

This is so simple 1. Go to your Google + account (https://plus.google.com/). 2. Click on the Profile icon on the Left. 3. If you look at the URL in the address bar, it should look something like this: https://plus.google.com/104653270154306099169/posts 4. The long numerical string in the URL is your Google+ ID. Here is CoderzHeaven’s from… Read More »

How to scroll a UIScrollView programatically ?

Hi, If you want to scroll a UIScrollView programatically as the result of any IBOutlet actions, use the following code in that particular action. [yourScroller setContentOffset:CGPointMake(0,250) animated:YES]; This will scroll your scroller named ‘yourScroller’ automatically to the point specified! 🙂

How to get Device Orientation in Cocos2D, iPhone in Objective C?

Hello all…… We may need to know that what is your current device orientation. Using the below code you can do this. Note: If you have to explicitly set the orientation of your phone to any of the above you can set this in the appDelegate.m file. You can put an “||” (OR) symbol in… Read More »

Simulate a Balloon in Box2D, iPhone or ANDROID

Hello……… Sometimes you may want your body to act against the gravity of the world. One method to do this is described below. First what you have to do is to make a body in the shape of a circle and give it the image of a balloon as the userdata. Then in the tick… Read More »

How to Fix ‘Warning : Multiple Build Commands For Output File' ?

Hi, The following warning, ‘Multiple Build Commands For Output File’ occurs when you try to delete resource files by ‘delete reference’ other than the correct method of‘move to trash’ while deleting files from ‘Resources’ folder of your project. Therefore the Copy Bundle Resources still holds the references of the same file you have deleted and… Read More »

How to Fix ‘Warning : Multiple Build Commands For Output File’ ?

Hi, The following warning, ‘Multiple Build Commands For Output File’ occurs when you try to delete resource files by ‘delete reference’ other than the correct method of‘move to trash’ while deleting files from ‘Resources’ folder of your project. Therefore the Copy Bundle Resources still holds the references of the same file you have deleted and… Read More »

How to Fix ‘Warning : Multiple Build Commands For Output File’ ?

Hi, The following warning, ‘Multiple Build Commands For Output File’ occurs when you try to delete resource files by ‘delete reference’ other than the correct method of‘move to trash’ while deleting files from ‘Resources’ folder of your project. Therefore the Copy Bundle Resources still holds the references of the same file you have deleted and… Read More »

Creating a Button using Objective C

Hi, Sometimes you may need to create some buttons to the View using Objective C code rather than using Interface Builder. Here is how you can do that easily and efficiently. //You can create button with type. Here I am creating a Custom Button UIButton *myButton = [UIButton buttonWithType:UIButtonTypeCustom]; //Then what? Give action to be… Read More »

Retrieving Data from NSTextField in Cocoa Mac

Hi, If you want to retrieve the data a user typed in on a Cocoa Mac application, follow the following steps. 1. You first need to declare a NSTextField variable in .h file @interface SampleAppDelegate : NSObject { NSTextField *myText; } @property (retain) IBOutlet NSTextField *myText; 2. Then you need to synthesize it for properties… Read More »

Adding Image to a UIImageView using Image URL

Hi, Sometimes you need to add Image to a UIImageView from the URL of the image you got. In that case, this is how you can add image to the UIImageView. NSString *picURL= @”http://photobucket.com/yourImage.gif”; NSData *picData = [[NSData alloc]initWithContentsOfURL:[NSURL URLWithString:mapURL]]; UIImage* picture = [[UIImage alloc] initWithData:picData]; [pictureView setImage:picture]; [picData release]; [picture release]; Here, pictureView is… Read More »