Tip: How To Bring Up The Memory Browser In Xcode 4

The memory browser tool was something that I got a lot of mileage out of in Xcode 3.

When I first started using Xcode 4 I didn’t find the memory tool right away – and simply forgot about it’s existence.

While browsing through tweeted iOS Stack Overflow threads I came across this nice tip on how to use the memory manager (yes, I found something useful on Stack Overflow!).

Here’s the tip:

Select Product > Debug > View Memory while debugging or press Shift-Cmd-M. This will display the memory browser and add an entry for ‘Memory’ into the Debug navigator:

You can also right-click on a variable in the Debug panel and select View Memory of “*<variable name>” to jump straight to displaying memory for that variable.

You can find more Xcode 4 tips on the Xcode 4 tutorial page.

Source: Robin Summerhill on Stack Overflow.

©2011 iPhone, iOS 5, iPad SDK Development Tutorial and Programming Tips. All Rights Reserved.

.

DeliciousTwitterTechnoratiFacebookLinkedInEmail


Touch Function in iPhone

In this application we will see how to multiple images moved using touch function. So let see how it will worked.

Step 1: Open the Xcode, Create a new project using View Base application. Give the application “TouchFunction”.

Step 2: Xcode automatically creates the directory structure and adds essential frameworks to it. You can explore
the directory structure to check out the content of the directory.

Step 3: Expand classes and notice Interface Builder created the ViewController class for you. Expand Resources
and notice the template generated a separate nib, TouchFunctionViewController.xib for the TouchFunction
application.

Step 4: we need to add resources in the application.

Step 5: Open the TouchFunctionViewController.h file and make the following changes:

#import <UIKit/UIKit.h>
@interface TouchFunctionViewController : UIViewController {
IBOutlet UIImageView *image;
IBOutlet UIImageView *image1;
IBOutlet UIImageView *image2;
IBOutlet UIImageView *image3;
IBOutlet UIImageView *image4;
}
@end

Step 6: Double click the TouchFunctionViewController.xib file and open it to the interface builder. First select the
view and bring up Attribute Inspector and change the background color. First drag the five ImageView from the
library and place it to the view window. Select the Image Views from the view and bring up Attribute Inspector and
select the litchi.png, raspberries.png, starfruits.png, apple.png,orange.png images. Connect File’s Owner icon to the
image views and select image, image1,image2, image3, image4. Now save the .xib file, save it and go back to the
Xcode.

Step 7: Open the TouchFunctionViewController.m file and make the following changes:

#import "TouchFunctionViewController.h"
@implementation TouchFunctionViewController
– (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
// get touch event
UITouch *touch = [[event allTouches] anyObject];
CGPoint touchLocation = [touch locationInView:self.view];
if ([touch view] == image) {
image.center = touchLocation;
}
else if ([touch view] == image1) {
image1.center = touchLocation;
}
else if ([touch view] == image2) {
image2.center = touchLocation;
}
else if ([touch view] == image3) {
image3.center = touchLocation;
}
else if ([touch view] == image4) {
image4.center = touchLocation;
}
}
– (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
}
#pragma mark – View lifecycle
– (void)viewDidUnload
{
[super viewDidUnload];
}
– (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}
@end

Step 8: Now Compile and run the application on the Simulator.

You can Download SourceCode from here

Analysis determines why Angry Birds is so popular

Here, finally, must certainly be the last word on Angry Birds. Certified Human Factors Engineering Professional Charles L. Mauro has done an exhaustive report called “A Cognitive Teardown of Angry Birds,” in which he breaks down, piece by ever-lovin’ piece, the throw-birds-at-pigs game and just what it does to users and their experiences.

The whole thing is quite interesting if you’re into user experience design, but the gist is that Angry Birds fits extremely well within our brains’ “mental model” of what the game should be. Not only is that bird-tossing physics engine easily calculated into our cranium, but the game’s bite-sized levels (which you can scroll across to re-check at any time) also play into our short-term memory programming as well.

And finally, Angry Birds nails down the visual experience by being both simple enough for almost anyone to understand, but just complicated enough to remember in an iconic way (so much so that the characters in the game have been turned into cakes, costumes, and even, um, bras. What Angry Birds did is no secret (and lots of other games have aped its look and aesthetics since — that “star rating on tons of levels” feature is now an iOS standby), but Mauro has done an excellent job really breaking down point by point why this game is so astoundingly successful on a cognitive level.

[via Slashdot]

Analysis determines why Angry Birds is so popular originally appeared on TUAW – The Unofficial Apple Weblog on Wed, 09 Nov 2011 21:00:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

Ron Johnson, former Apple retail chief, rebuilding Apple staff at JC Penney

Ron Johnson left Apple as head of retail at the beginning of this month to run J.C. Penney, and apparently he’s wasting no time rebuilding an Apple-style shop over there. The Wall Street Journal reports that he’s aiming to bring both former Apple executives Daniel Walker and Michael Kramer on the staff there, essentially recreating part of the group that ran Apple from the year 2000 to 2005. Walker actually brought Johnson on at Apple, and it seems like the group is coming back together to do at the clothing retail company what they helped to do at Apple Inc.

Of course, as Apple fans, we don’t really have too much interest in the inner workings of J.C. Penney or what they’re trying to do with that company. But it is interesting to think that the principles and ideas that Apple has come up with in its incredibly successful retail program are now floating out to other retail chains and industries. Going to an Apple Store is a pretty singular experience, but what if it wasn’t? I’m interested to see a clothing store like J.C. Penney that’s put a few of Apple retail’s ideas and bits of thinking into play.

Ron Johnson, former Apple retail chief, rebuilding Apple staff at JC Penney originally appeared on TUAW – The Unofficial Apple Weblog on Wed, 09 Nov 2011 20:00:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

Daily iPad App: ShopSmart by Billeo


Billeo is an online shopping assistant and payment service that saves passwords, fills out forms and helps you both shop and pay bills online. To expand its service, the company just released ShopSmart, an iPad app that keeps track of reward cards and other discounts while you shop.

When you launch ShopSmart for the first time, you are prompted to enter your existing Billeo account information or setup a new account. You don’t have to setup a Billeo account to use ShopSmart, but most of the value-added features are not available without an account. Having a free Billeo account lets you fill in form information automatically, receive additional discounts and save your credit card information in the app’s e-wallet., Registering for an account is easy, all you need is an email address to create a username and password.

Once you enter your account information, you can add your Loyalty cards to the app in the settings. At launch, Billeo lets you add offers from providers like Visa, Discover, AARP, and Billeo itself. There’s only six providers, but Billeo plans to expand this list in the future. Within the settings you can also manage your e-wallet information, add location information for your Daily Deals and setup your Facebook account so you can share while you shop. Once you’ve entered all your personal information, you are ready to jump in and start finding some bargains.

The app has a web browser interface that lets you shop by searching for an item or visiting a retailer’s web site. If I want a new Baxter State Parka from L.L. Bean, I can go directly to L.L. Bean’s website or search for the item using the search field. If you search, the search results will include an offer tag to highlight those stores with a redeemable discount.

As you shop, discount offers will be shown in the bottom left-hand corner. Just click the offers icon to see your current discounts. If you accept a discount, it will be automatically applied during checkout. ShopSmart will also fill in your shipping, billing and credit card information, too. It’s cumbersome to type all that personal information using the iPad, so being able to let the app do it for you is a huge bonus.

ShopSmart also has a social component called ShopTalk that lets you share items you want to buy and offers that you find. ShopTalk keeps track of your posts and lets you read and respond to comments within the app. It’s a great way to get feedback about a product before you purchase it.

As you can tell from description thus far, ShopSmart is geared towards online shopping. There’s no tie-in for local stores, primarily because most people aren’t going to use their iPad while walking around the store. The only local features are found in the Daily Deals section which is populated by Groupon. This section, like the Loyalty cards section, will expand to include other services.

Overall, ShopSmart is great for the online shopper who wants the convenience of using an iPad and has a lot of different reward card offers. Right now, the app is a little lean on the number of available offers that you can add and this definitely detracts from the overall experience. I would love to keep track of my AAA discounts, Best Buy discount, Barnes & Noble discount using ShopSmart, but right now I can’t.

I do like the clean interface of ShopSmart and the familiar web browser look. I especially appreciate the app’s ability to do most of the grunt work like filling in forms and entering discount codes. If Billeo can add in more credit card offers and retailers, then the app will become a valuable tool for the discount shopper. ShopSmart from Billeo is available for free from the App Store.

Daily iPad App: ShopSmart by Billeo originally appeared on TUAW – The Unofficial Apple Weblog on Wed, 09 Nov 2011 19:30:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

Infinity Blade II previewed, has bigger world, more enemies, and new gear features

With the launch of Infinity Blade II just a few short weeks away, Chair has shown the game off to IGN Wireless, and they report that it looks terrific. The game mostly follows in the path of the first title, with the player having to navigate a path over and over while upgrading their equipment and skills while doing so. But this time around, the “loop” is significantly bigger (with an intro section that’s apparently as long as the last game), and there’s another reason for going around it a few times, which we’ll learn as we play through the game.

There are also some significant updates to the gear system, including the ability to dual wield one-handed blades, or even use a big two-handed sword (with its own mechanics for blocking). The magic system has been updated, and gear can now be adorned with gems for extra stats or bonuses. There are a few new varieties of enemies, and enemies will now use tactics like magic also. The world itself is upgraded, too — various trips through the game will unveil new paths and story lines that play out as you go.

And the preview hints at even more interesting features, like “clash mobs,” where players all around the world can whittle the health of a huge boss down and then all get a reward for killing it. Sounds really interesting — Infinity Blade II is due out on December 1. Can’t wait!

Infinity Blade II previewed, has bigger world, more enemies, and new gear features originally appeared on TUAW – The Unofficial Apple Weblog on Wed, 09 Nov 2011 18:30:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

Huge Apple memorabilia collection up for auction on eBay

TUAW reader Kray Mitchell sent along a link to let us know he’s posted a whole bunch of his collection of Apple memorabilia from over the years on eBay, and even if you don’t have the cash to pick up this stuff at all, it’s at least interesting to browse through it. He’s got an original Newton MessagePad up there to look at, a box of those Apple playing cards that we’ve seen before, lots of promo materials like this original iMac poster, and even a … Service Award for the PowerBook team from 1991? Huh.

If nothing else, it’s a pretty interesting walk through some of Apple’s history. We can’t vouch for the prices on any of these things (the playing cards are already up to $100 and might go even higher), but just getting the chance to see some of this stuff after almost 20 years now is pretty cool.

Huge Apple memorabilia collection up for auction on eBay originally appeared on TUAW – The Unofficial Apple Weblog on Wed, 09 Nov 2011 17:30:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

TUAW TV Live: A little bit of this, a little bit of that…

Keeping with the recent trend of my life being crazy — yes, I will be doing four podcasts today — the TUAW TV Live show is going to be a mashup of anything that’s close at hand. Whether it’s a pile of new cases from Hard Candy, a home monitoring system that plugs into Skype, a sweet new bag from Tom Bihn, a discussion of electronic publishing, or chatting about the latest Apple news, we’ll do it on TUAW TV Live.

Below, you’ll find a Ustream livestream viewer and a chat tool. The chat tool allows you to participate by asking questions or making comments.

If you’re driving somewhere and would like to watch TUAW TV Live while you’re stuck in traffic, please don’t — keep your eyes on the road! However, if someone else is doing the driving, you can watch the show on your iPhone and join the chat by downloading the free Ustream App. It’s a universal app and is wonderful on an iPad, both for viewing and participating in the chat.

We’ll start at about 5 PM ET, so if you’re seeing a prerecorded show, be sure to refresh your browser until you see the live stream. For those of you who are not able to join us for the live edition, you’ll be able to view it later this evening on our TUAW Video YouTube channel and as part of the TUAW TV Live podcast viewable in iTunes or on any of your Apple devices.

TUAW TV Live: A little bit of this, a little bit of that… originally appeared on TUAW – The Unofficial Apple Weblog on Wed, 09 Nov 2011 16:55:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

iPhone 4S has a Siri-specific proximity sensor

During iFixit’s teardown of the iPhone 4S, the site came across a component that it couldn’t immediately identify. After subsequent testing, iFixit has determined that the iPhone 4S has an infrared LED that acts as a secondary proximity sensor, and its functions appear to be tied directly to Siri.

All earlier models of iPhones have had a proximity sensor designed to shut the handset’s touchscreen off when you raise it to your ear. This is designed to prevent your face from dialing numbers while you’re on a phone call. The sensor is normally only active during phone calls or when using a VoIP app like Skype.

In contrast, this new infrared LED is constantly active if you have enabled “Raise to Speak” in Siri’s settings. The whole purpose of the sensor is essentially the same as the iPhone’s traditional proximity sensor, just with a different function; instead of deactivating something, this sensor instead activates Siri when you raise it to your ear.

Although the LED is constantly active if you have “Raise to Speak” enabled, it’s most likely drawing a minuscule amount of power and thus not the cause of widely-reported battery issues in the iPhone 4S (which a forthcoming iOS 5 update hopes to address). It’s also worth noting, as iFixit rather humorously does, that although the iPhone 4S will constantly be emitting an infrared beam in your direction as you use it, the beam is completely harmless.

iPhone 4S has a Siri-specific proximity sensor originally appeared on TUAW – The Unofficial Apple Weblog on Wed, 09 Nov 2011 16:30:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

TRVL magazine to donate subscription fees to charities

TRVL is a free electronic travel magazine for the iPad that I raved about in September. The beautiful photography, layout, and typography all make it a standout among the usual junk that passes for e-magazines these days, and TRVL was free, which made it a no-brainer to subscribe to. The magazine creators ran into a dilemma. They wanted readership to grow, and to do that they needed to get TRVL into Apple’s Newsstand, where they expected subscriptions to climb by 500% or more.

As founding publisher of TRVL Michel Elings noted, “we had been waiting for Newsstand to arrive ever since we heard the first rumors, knowing a free magazine like TRVL would greatly benefit from direct competition with magazines like National Geographic Traveler, which are still charging $4.99 for a single issue.” TRVL’s software partner, WoodWing, wasn’t ready for Newsstand when it launched, and when it finally was ready, it didn’t support the free subscription model supported by TRVL. What to do?

Well, in a classic example of making sweet, sweet lemonade out of the lemons that life hands you, Elings and Wijnands decided to sell TRVL in Newsstand for $0.99 per month and will be giving all of the subscription money to six charities selected by readers. As a reader, you have an option to donate your subscription dollars to your choice of one or more of those charities.

TRVL is the top rated magazine on iPad, and now if you want to read it, you’ll be forced to do something good for the world. I know I’ll be buying my subscription. How about you?

TRVL magazine to donate subscription fees to charities originally appeared on TUAW – The Unofficial Apple Weblog on Wed, 09 Nov 2011 16:00:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

Vooma Peel PG92 will bring dual-SIM capability to iPhones

As Engadget points out, Vooma’s new Peel PG92 isn’t the first dual-SIM case for the iPhone, but it’s probably the nicest-looking one. The planned case consists of a battery pack to charge your phone and an unlocked SIM slot that adds dual-SIM capability, but it requires a jailbroken iPhone 4 or 4S and a companion app.

TechCrunch tested a pre-release model, calling the Peel PG92 a “dumbed-down cellphone.” Once the app is installed on jailbroken phones, a user can control the phone inside the case. The site said other than few sacrifices in rendering the interface that interacts with the second SIM card, it found that using Peel PG92 to place calls using the second SIM card worked seamlessly.

There’s no price or availablity information yet, but those interested can sign up for more information through Vooma’s site.

Vooma Peel PG92 will bring dual-SIM capability to iPhones originally appeared on TUAW – The Unofficial Apple Weblog on Wed, 09 Nov 2011 15:30:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

Daily Mac App: Gelatin

Some tasks need a really simple, straightforward, no-nonsense app to get the job done. Combining PDF files is one of those tasks, and Gelatin is the app to do it.

Preview can do a similar thing, but it’s certainly not as straightforward as Gelatin. The app offers a window to drag-and-drop the files you want combined together onto. Select them in finder in the order you want them melded and drop them onto Gelatin. The app will take care of the rest spitting out a PDF with all the files you’ve dropped onto it joined end-to-end.

You can take the file and edit it up with Preview, email it off or save it. Gelatin is free for a limited time and is worth a download for the shear ease of use. If you ever need to combine PDF files, making Gelatin part of your workflow could save you time and effort.

Daily Mac App: Gelatin originally appeared on TUAW – The Unofficial Apple Weblog on Wed, 09 Nov 2011 15:00:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

TUAW TV Live at 5 PM ET: A little bit of everything

I’m still in a tizzy running around doing sixteen things at once, so I wasn’t able to get a guest lined up for today’s TUAW TV Live. So, what’s a live streaming video host to do? Easy — just talk about a lot of new and wonderful things for Apple devices, chat with viewers about the news, throw in a little Apple trivia and discuss the differences between publishing a book on the Amazon Kindle Bookstore and the Apple iBookstore.

As usual, I’ll be starting the show at 5 PM ET (2 PM PT / 10 PM GMT) sharp, and we’ll take a few minutes to chat before the demos start. To join in on the chat and watch the live streaming video, drop by TUAW about five minutes before the start time to get your instructions on how to participate. If you’re unable to join us for the show, remember that you can always subscribe to the video podcast and watch the show at your leisure in iTunes or any other favorite podcatching app. The past shows are also available on the TUAW YouTube channel.

The chat is now available as well on IRC: join us on server chat1.ustream.tv, chat room #tuaw-tv.

TUAW TV Live at 5 PM ET: A little bit of everything originally appeared on TUAW – The Unofficial Apple Weblog on Wed, 09 Nov 2011 14:30:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

Daily Update for November 9, 2011

It’s the TUAW Daily Update, your source for Apple news in a convenient audio format. You’ll get all the top Apple stories of the day in three to five minutes for a quick review of what’s happening in the Apple world.

You can listen to today’s Apple stories by clicking the inline player (requires Flash) or the non-Flash link below. To subscribe to the podcast for daily listening through iTunes, click here.

No Flash? Click here to listen.

Daily Update for November 9, 2011 originally appeared on TUAW – The Unofficial Apple Weblog on Wed, 09 Nov 2011 14:15:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

Judge tells Apple to reveal Australian contracts to Samsung

Things are really heating up between Apple and Samsung in Australia. In the war between the two electronics behemoths, a judge ruled that Apple Inc. must now provide Samsung Electronics Co. with copies of contracts with Australian mobile-phone carriers.

If you remember this story, Samsung has sued Apple in Australia claiming that the iPhone 3GS, iPhone 4 and iPad 2 infringe on patents that the company holds for various wireless technologies. For some reason, Samsung asserts in the patent lawsuit that carriers are contractually obligated to subsidize iPhone sales — that’s not surprising, since that’s standard procedure for many carriers and many phone manufacturers.

However, Australia Federal Court Justices Annabelle Bennett ordered Apple to produce agreements that it has with Vodafone, SingTel Optus, and Telstra if they don’t agree on the assertion. Apple’s lawyer Andrew Fox told the judge that “This is quite clearly a fishing expedition,” and that Apple will fight the disclosure, suggesting that it’s an effort to find other damaging evidence.

The Samsung lawsuit was filed in September after Apple requested a court order to bar the sale of the Galaxy Tab 10.1 in Australia. Apple did win that battle, with an injunction granted on October 13. Apple has also been required to turn over 220 pages of documents to Samsung relating to the source code for the iPhone 4S firmware, but Samsung wasn’t happy with what they got, stating that there was a “missing file.”

Judge tells Apple to reveal Australian contracts to Samsung originally appeared on TUAW – The Unofficial Apple Weblog on Wed, 09 Nov 2011 14:00:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments