Humble Music Bundle shows charity disparity among Mac, Linux and Windows users

I bet that behavioral economists get rather excited when they see pay-what-you-want offers going viral. Assuming the seller is collecting some basic demographic detail, the resulting statistics might deliver some interesting insights into the relative altruism (or discretionary cash reserves) of different sorts of folks.

The Humble Bundle team (responsible for the Humble Indie gaming bundles that we’ve covered before) is running a Humble Music bundle, accessible to all sorts of music fans. Featured artists include Jonathan Coulton, They Might Be Giants and MC Frontalot; a flexible portion of the purchase price goes toward not-for-profit cause groups like Child’s Play Charity and the Electronic Frontier Foundation.

The bundle price is entirely up to the buyer, although suggested pricing goes from $100 down to $15. If you pay more than the rolling average price (currently around $8.28) you get a bonus album of remixes from viral-video darlings OK Go. You can also define the split between the artists and the charities, and contribute a “Humble Tip” for the bundle organizers. Given that buyers can pay what they want, what sort of variance do the Humble Bundlers see among their contributors/customers?

It’s not scientific, and there could be a whole horde of confounding factors, but take a look at the stats in the image above. Mac users (representing about 1/5 of the 45K total customer count) are paying an average of $9.84 for the bundle, more than $1.50 above the average price and $2.40 above the average Windows user. That might be skewed by a few “whales” who are contributing $100 or more from the Mac side, but even so the population is large enough that the differences would seem to be significant.

Before you start forwarding this post to your penny-pinching Windows-using wealthy relatives, note that the Mac users aren’t the most likely to empty their wallets for tunes. Linux users, with a slightly smaller share of the overall purchases, are coughing up a stunning $11.94 per transaction — more than $3.50 higher than the average cost. This might be an artifact of the Humble Bundle’s past service to Linux gamers, who may be feeling especially supportive of HB’s efforts here, or maybe Linux users feel more strongly about the charities/artists involved. Or they just really are more generous by nature. With the recently finished Humble Indie Bundle 5, Linux users donated an average of $12.51 per transaction.

It would be really interesting to do a deeper dive into the HB sales data, especially from the perspective of Dan Ariely or the Freakonomics guys. Most sellers aren’t this transparent about their customers, and what they do with the behavioral data they collect — and there’s good PR reasons why they don’t share more. In June, travel site Orbitz caught some flak for acknowledging that it showed different search results to Mac users (skewed towards the higher-end properties that they apparently prefer to book) than to PC users. While both sets of searchers would pay the same price for the same room, Mac users responded better to upscale hotels and slightly more expensive stays.

The Humble Music Bundle is available until Thursday, August 9.

Humble Music Bundle shows charity disparity among Mac, Linux and Windows users originally appeared on TUAW – The Unofficial Apple Weblog on Mon, 06 Aug 2012 16:00:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

Rumor Roundup: ‘Likely fake, but have a look’

The week was chock full of actual news from the Apple versus Samsung trial, and the amount of inside information that came out in evidence and testimony would’ve been any rumor site’s dream come true if it had only come out a few years ago. But that doesn’t mean they can’t keep speculating on the as-yet-unreleased and may-never-be-released Apple products of tomorrow.

RBC: Apple’s iPad mini is coming this fall (BGR)

If you’ve been wringing your hands over whether the iPad mini would ever actually see the light of day, worry no longer. RBC Capital Markets is on the case, and according to them, the iPad mini is, in BGR’s words, “Definitely maybe” coming this fall.

Man, am I glad RBC Capital Markets finally weighed in. I’m sure that, like me, they’re your most trusted source of news on all of Apple’s inner workings. Why, I was just saying to myself the other day, “Who the [expletive deleted] is RBC Capital Markets?” That’s the kind of reputation money can’t buy.

Apple in talks to acquire e-commerce social network The Fancy? (9to5 Mac)

Taking a break from its usual schtick of sensationalist linkbaiting, Business Insider now says Apple may be in talks to buy The Fancy, which from the sounds of things is basically a unisex version of Pinterest. If this turns out to be true, I’d be curious to see what Apple does with the site. I have a feeling it’d be more of a tech/talent grab for the App Store than anything else, but who knows.

New Details On Apple’s Next iPhone, iPods, iPad mini, iPad (4th-Gen) + Cases (iLounge)

iLounge has a bushel of rumors regarding Apple’s forthcoming autumn product launches, so let’s just go through them one by one.

  1. New iPhone: Yup.
  2. New iPhone cases: Probably. Why not?
  3. New iPod touch: Yup.
  4. New iPod nano: Let’s all hope so.
  5. iPad mini: Don’t hold your breath. Unless you can hold it until November. Or Neverember.
  6. Fourth-generation iPad: Not a chance.

iLounge likes to come out with long lists like this, and more often than not the majority of things on them never come to pass.

Eight-Pin Dock Connector + iOS 6 / Bluetooth 4 Link Details? (Updated) (iLounge)

Let’s have two more pie-in-the sky rumors to round out the list.

New 8-pin Dock connector: Contradicting the majority of rumors thus far which pointed to a 16- or 19-pin connector, iLounge claims the iPhone’s new dock will have only 8 pins compared to the current iPhone’s 30. What does this mean to you as a consumer? Not much, unless you get in on the “Apple took away 22 of my pins, RRRAAALLLGH” class-action lawsuit that’s bound to start in October.

iOS 6 + Bluetooth 4 Link: This rumor claims the iPhone (and other devices) will soon communicate with one another over low-power (and presumably always-on) Bluetooth 4. This isn’t a new idea; the iPhone 4S was the first Apple device to have Bluetooth 4.0 support, and the iPad (3) and 2012’s MacBook Air and MacBook Pro models followed suit. Plenty of people speculated that low-power Bluetooth would be useful for accessories like watches and heart rate monitors, but Apple hasn’t showed much interest in actually utilizing this built-in low-power Bluetooth yet. I’m cautiously optimistic it’ll throw the switch eventually.

New Video of “iphone 5 glass lens” Leaks (ETrade Supply)

These guys took one of those “iPhone 5” faceplates that have been making the rounds and went to town on it with a digital micrometer. If you were ever curious about exactly how many fractions of a millimeter thinner the new glass is compared to the one on the iPhone 4S, here’s your answer.

If this is a fake, ETrade Supply has gone Kubrickian in its attention to detail on it. And frankly, this part has popped up in so many different locations by now that my credit card and I are both convinced the next iPhone will have a 16:9 display ratio after all.

Next-gen iPhone to launch in Sept. despite reported component shortage (AppleInsider)

Rising star of the Apple rumor scene, analyst Ming-Chi Kuo claims that despite DigiTimes’ claims of component shortages (more about that nonsense later), the next iPhone will indeed launch in September.

Following my usual rule that anything DigiTimes says about Apple is 95 percent certain not to happen, I’m throwing my money behind Kuo’s claim.

Sharp to start shipping iPhone screens to Apple this month (Reuters)

Sharp’s new president supposedly revealed that his company will start shipping screens for the next iPhone this month — during a press conference. One of two things happened here: either the press misquoted him, or Sharp’s going to be looking for a new president soon.

Non-functioning next-gen iPhone prototypes/fakes surface in Bangkok?

These iPad mini shells are likely fake but have a look

9to5 Mac posted two stories about “parts leaks” that it couldn’t even vouch for, one of which it was 99 percent certain was fake. The question naturally arises then: why post them at all? The answer, my friend, is blowing in the pageviews.

Wall of shame

DigiTimes did what it always tends to do in the weeks leading up to Apple product launches and trotted out its “low yield rates for (x) may affect Apple’s next (product)” Mad Libs. This time, it’s new touchscreen components that will supposedly limit production of the next iPhone. Unfortunately for this claim, other sources who have managed to get more than one prediction in two years correct claimed the opposite.

The “sometimes reliable” site also claims that Apple’s going to shift display production away from Samsung and toward Sharp and LG (noting that Sharp’s own president is chiming in on the topic now, as mentioned above). Thing is, it’s been saying the same thing about various components for well over a year, yet many of the iPad and iPhone’s components are still Samsung-manufactured. No word yet on whether DigiTimes’ latest citation managed to cost Samsung another $10 billion in market value.

You know… the more I think about it, the more I think Apple should buy DigiTimes. The site gets the rumor blogs’ undivided attention despite almost never getting anything right — the perfect tool for product secrecy — and it’s already cost Samsung more money than Apple will get out of the company even if Apple wins its patent lawsuit. It makes perfect sense.

Rumor Roundup: ‘Likely fake, but have a look’ originally appeared on TUAW – The Unofficial Apple Weblog on Mon, 06 Aug 2012 15:30:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

iOS YouTube standalone app to vanish in iOS 6

It seems like only yesterday that one of our readers was bemoaning the poor playback quality of the iOS YouTube app, and wishing that Apple would do something to fix it. Given that YouTube is a Google property, and the two former BFFs aren’t on the best of terms nowadays, it’s no wonder that the video playback app has languished. Mobile Safari does a bang-up job with most YouTube videos, so it seemed logical that the days of the standalone app might be numbered.

In the iOS 6 beta 4 build released today, that number appears to have come up. The Verge noted that the YouTube app is missing in action (per 9to5Mac) and got an official statement from Apple on the topic: “Our license to include the YouTube app in iOS has ended, customers can use YouTube in the Safari browser and Google is working on a new YouTube app to be on the App Store.” Engadget’s Darren Murph expands on that, as Apple told him the existing YouTube app will not be removed from iOS 5 devices.

Goodness. As the first iPhone shipped in the summer of 2007 with the YouTube app onboard, it looks like there was a five-year countdown on the bundling arrangement. Google’s new App Store app for YouTube seems likely to debut with iOS 6 this autumn.

iOS YouTube standalone app to vanish in iOS 6 originally appeared on TUAW – The Unofficial Apple Weblog on Mon, 06 Aug 2012 15:00:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

iOS 6 to ship without dedicated YouTube app

With the release of the new iOS Beta 4 several readers have noted that it lacks one very important app which has been present on the iPhone since the original launch in 2007, iOS no longer includes a dedicated  YouTube app.

The reason for the removal is unclear, however as Tuaw.com stipulates the original app did debut in 2007 and 2012 is five years later one could guess that some sort of timed contract had been signed. Furthermore you might assume that since Apple decided to integrate their own Map app into iOS, that perhaps Google has decided to pull the plug on the YouTube App.

YouTube videos can still be played through the embedded viewer, but the removal of the dedicated YouTube app marks a significant reduction in the prominence of Google on iOS.

A statement released earlier today from Apple reads:

Our license to include the YouTube app in iOS has ended, customers can use YouTube in the Safari browser and Google is working on a new YouTube app to be on the App Store.


Open Source iOS Library For Easily Creating 3D Charts

Some time ago I posted about several of the available open source iOS Objective-C charting libraries.  While they are excellent libraries all of them are 2D so if you’re looking for a 3D charting library you’re going to need to find something different.

Today I came across a very versatile 3D library that makes use of GLKit and allows you to make great looking interactive 3D charts with either bars or cylinders to illustrate the data.

Here’s a video by the library’s creator Sebastien Windal showing the library in action:

You can find the library FR3DBarChart on Github here.

You can find the documentation  on Sebastien’s blog here.

A great library for making 3D charts that includes a number of examples.

Related Stuff:

– Plotting Libraries For Easy Charts Without The Cost
– Example: A Fun Way To Display Chart Data Using The Chipmunk Physics Engine And iOS Accelerometer
– iOS 5 GlKit Example And Tutorial Page
– iOS Libraries Category

DeliciousTwitterFacebookRedditLinkedInEmail


Tutorial: Create A Cut The Rope Style Game With Cocos2D And Box 2D

I’ve mentioned several tutorials for making games like the popular finger slicing game Fruit Ninja and the CCBlade class for creating a finger slicing effect with Cocos2D.

Recently I came across another set of tutorials using Cocos2D inspired by the popular Cut The Rope game.

These tutorials demonstrate how to set up a Cocos2D and Box2D project, the physics (including how to set up the ropes), setting up the rope cutting, and more.

Here’s a video demonstrating the tutorial by Gustavo Ambrozio featuring graphics by Vicki Wenderlich:

You can find the tutorial in two parts here: Part 1, Part 2.

A great example of how to set up a cutting game with rope physics.

Related Stuff:

– Cocos2D Tutorial And Example List
– iOS Developer Tutorials Category

DeliciousTwitterFacebookRedditLinkedInEmail


Table View Controller in iPad

Table views are most often used in conjunction with Navigation Controllers to present a list of choices to the user, then push a new view controller depending on the choice the user made. In this blog, we’ll demonstrate how to set up a table view holding a list of colors, then push a view controller having a background color corresponding to the selected color in the table view. So, let’s get started!

Start up Xcode, select “Create a new Xcode project,” and select the Empty Application template. Name the project “TableView” and choose options as shown:

Click Next, choose a location to save the project, and click Create.

After the project has been created, select the AppDelegate.m file, then right-click it and select “New File…” from the popup menu. (Selecting the AppDelegate.m file first will place the new files immediately after the selected file.) We will be creating a new UITableViewController class. Choose the Objective-C class template, click Next, and name the new file RootViewController. Make sure it is a subclass of UITableViewController, and select options as shown:

Click Next and save the new files to the default location by clicking Create. Now repeat the above process, this time creating a new UIViewController class called ColorViewController with the following options:

When you are finished, the navigation panel in Xcode should look like this:

Now we’ll set up the AppDelegate to instantiate the RootViewController and a navigation controller, make the RootViewController object the root view controller of the navigation controller, and add the navigation controller’s view as a subview of the main window. Here is AppDelegate.h:

#import <UIKit/UIKit.h>
#import "RootViewController.h"

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) UINavigationController *navController;
@property (strong, nonatomic) RootViewController *rootViewController;

@end

We’ve imported the RootViewController class, and also made properties for both the RootViewController and a UINavigationController object called navController. Let’s see how we set this up by looking at the AppDelegate.m file:

#import "AppDelegate.h"

@implementation AppDelegate

@synthesize window = _window;
@synthesize navController = _navController;
@synthesize rootViewController = _rootViewController;

– (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    // Override point for customization after application launch.
    self.rootViewController = [[RootViewController alloc] initWithNibName:nil bundle:nil];
    self.navController = [[UINavigationController alloc] initWithRootViewController:self.rootViewController];
   
    [self.window addSubview:self.navController.view];
    [self.window makeKeyAndVisible];
    return YES;
}
…

As always, we first synthesize the properties, giving aliases to the iVar names so that we’re not tempted to access the properties without using “self.” The only changes we’re making to this file occur in the application: didFinishLaunchingWithOptions: method; the rest of the file is not shown here to save space.

We instantiate self.rootViewController from the RootViewController class. The nib name “nil” here refers to the xib file that is already associated with the class: RootViewController.xib. A bundle of nil refers to this application’s bundle.

Next, the navController object is instantiated, and initialized with rootViewController as it’s root view controller. Finally, the navController’s view is added to the main window as a subview, and the main window is made key and visible.

If we run the application now, it will display an empty table view, because we’ve not told the RootViewController what data to display, or how to display it. Open the RootViewController.h file, and make changes as shown here:

#import <UIKit/UIKit.h>
#import "ColorViewController.h"

@interface RootViewController : UITableViewController

@property (nonatomic, strong) NSArray *tableCellContent;

@end

Notice that we’ve imported the header for ColorViewController, and also made a property of an NSArray object called tableCellContent.

UITableViewController objects adopt two protocols: UITableViewDelegate and UITableViewDataSource. The required delegate methods are already provided in a table view controller’s implementation file as “stubs,” it is up to us to fill them out with useful code.

Open RootViewController.m. You will see several methods. The first method we will make changes to is viewDidLoad:

– (void)viewDidLoad
{
    [super viewDidLoad];

    // Uncomment the following line to preserve selection between presentations.
    // self.clearsSelectionOnViewWillAppear = NO;
   
    self.tableCellContent = [NSArray arrayWithObjects:@"red", @"green", @"blue", @"yellow",
                             @"cyan", @"white", @"black", @"gray", nil];
   
    // Uncomment the following line to display an Edit button in the navigation bar for this view controller.
    // self.navigationItem.rightBarButtonItem = self.editButtonItem;
}

Here, we set up the tableCellContent array with eight NSString objects containing the names of colors. An NSArray is always set up with the last object set to nil: make sure that you also include this value!

Now alter the numberOfSectionsInTableView: and tableView: numberOfRowsInSection: methods:

– (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
{
    // Return the number of sections.
    return 1;
}

– (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    // Return the number of rows in the section.
    return self.tableCellContent.count;
}

In this demo, our table view will have only one section, so we simply return 1 from the numberOfSectionsInTableView: method. But in the tableView: numberOfRowsInSection: method, we return the count of objects in the tableCellContent array: this will allow the table view controller to have (initially) the proper number of rows.

In order for the table view controller to display its cells, we must alter the tableView: cellForRowAtIndexPath: method:

– (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    static NSString *CellIdentifier = @"Cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
   
    if (cell == nil) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
    }
   
    // Configure the cell…
    cell.textLabel.text = [self.tableCellContent objectAtIndex:indexPath.row];
    return cell;
}

A table view contains a number of reusable cells. Initially, the table view contains no cells, so we must instantiate them ourselves. But as cells are scrolled on and off the table view, the system will reclaim them from the queue of reusable cells. The dequeueReusableCellWithIdentifier: method returns an already used cell that is not currently being displayed in the view.

But if there is not a reusable cell (if cell == nil), we must create one. Here, we create an instance of UITableViewCell with the UITableViewCellStyleDefault style. This statement will add a cell to the queue of reusable cells.

Next, we set the cell’s textLabel’s text property to the object in the tableCellContent array that has the index of indexPath.row. The indexPath is an instance of NSIndexPath, which represents a path to a specific node in a collection of arrays. By using indexPath.row, we can get an integer corresponding to the index for a particular cell in the table view, and use it as an index into the tableCellContent array. After setting the cell’s text, we return the cell.

If we run the application now, the table view will show text in each of its first eight cells, corresponding to the text in the tableCellContent array:

But tapping a cell in the table view will have no result: to set that up, we must alter a fourth delegate method: tableView: didSelectRowAtIndexPath:

– (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    // Navigation logic may go here. Create and push another view controller.
   
     ColorViewController *colorViewController = [[ColorViewController alloc] initWithNibName:nil bundle:nil];
    // array is: @"red", @"green", @"blue", @"yellow", @"cyan", @"white", @"black", @"gray"
    UIColor *bgColor;
    switch (indexPath.row) {
        case 0:
            bgColor = [UIColor redColor];
            break;
        case 1:
            bgColor = [UIColor greenColor];
            break;
        case 2:
            bgColor = [UIColor blueColor];
            break;
        case 3:
            bgColor = [UIColor yellowColor];
            break;
        case 4:
            bgColor = [UIColor cyanColor];
            break;
        case 5:
            bgColor = [UIColor whiteColor];
            break;
        case 6:
            bgColor = [UIColor blackColor];
            break;
        case 7:
            bgColor = [UIColor grayColor];
            break;
           
        default:
            break;
    }
     
     colorViewController.view.backgroundColor = bgColor;
     // Pass the selected object to the new view controller.
     [self.navigationController pushViewController:colorViewController animated:YES];
     
}

In this method, we’re instantiating colorViewController as an instance of ColorViewController. We then switch on the indexPath.row value, setting a UIColor object (bgColor) to the appropriate color. After this, we set the colorViewController’s view’s backgroundColor property to bgColor, and then push colorViewController onto the navigation controller’s stack using animation.

Run the application, and select a color from the initial table view. Notice that the navigation controller automatically places a back button in the colorViewController’s view when it is pushed, so the user can easily return to the table view.


The Table View. About to select “green” from the list…


colorViewController’s view is shown. We can return to the table view by tapping the “back” button.

A Utility App for iPhone

On the iPhone, the Utility Application template creates an app with a two view controllers. The second view controller’s view is displayed when the user touches a small Info Button in the lower right corner of the first view controller’s view. This allows us to place detailed information in the second view about what is happening in the first view. Let’s see how it works.

Start Xcode, choose “Create a new Xcode project,” and select the Utility Application template. Click Next, name the project UtilityApp, and choose options as shown:

Click Next, choose a location to save the project, and click Create.

Now we’ll set up the XIB files for the two view controllers. First, open MainViewController.xib and drag a UILabel and UIStepper control to the view as shown:

Change the text of the label to “Triangle,” and the properties of the stepper to those shown here:

The application will display information about regular polygons having from 3 to 12 sides.

Open MainViewController.h, and make changes as shown:

#import "FlipsideViewController.h"

@interface MainViewController : UIViewController <FlipsideViewControllerDelegate>

@property (strong, nonatomic) IBOutlet UILabel *lbPolygon;
@property (strong, nonatomic) FlipsideViewController *flipController;

– (IBAction)showInfo:(id)sender;
– (IBAction)stepperChanged:(UIStepper *)sender;

@end

We’ve added properties to the interface for the label (as an outlet) and the FlipsideViewController object itself. (In the template app, the FlipsideViewController is instantiated “just in time,” in our demonstration, we’re going to instantiate it in viewDidLoad.) In addition, we’ve added an action method called stepperChanged: that will respond to a change in value on the stepper control.

Return to MainViewControler.xib, and wire up the lbPolygon label to the label reading “Triangle” and the stepperChanged: method to the Value Changed event of the stepper control:

Notice that the showInfo: method is already wired to the small info button’s Touch Up Inside event. This is provided for us by the template; we won’t change it.

Open MainViewController.m and make these changes to the file:

#import "MainViewController.h"

@interface MainViewController ()
{
    NSArray *polyNames;
}

@end

@implementation MainViewController

@synthesize lbPolygon;
@synthesize flipController;

– (IBAction)stepperChanged:(UIStepper *)sender
{
    self.lbPolygon.text = [polyNames objectAtIndex:sender.value – 3];
    NSString *flipKey = [NSString stringWithFormat:@"%d", (int)sender.value];
    [self.flipController setupFlipsidePropertiesWith:flipKey];
}

– (void)viewDidLoad
{
    [super viewDidLoad];
        // Do any additional setup after loading the view, typically from a nib.
    polyNames = [NSArray arrayWithObjects:
                 @"Triangle", @"Square", @"Pentagon",
                 @"Hexagon", @"Heptagon", @"Octagon",
                 @"Enneagon", @"Decagon", @"Hendecagon",
                 @"Dodecagon", nil];
    self.flipController = [[FlipsideViewController alloc]
                           initWithNibName:@"FlipsideViewController" bundle:nil];
    self.flipController.delegate = self;
    self.flipController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
}

– (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    self.lbPolygon = nil;
}

– (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}

#pragma mark – Flipside View

– (void)flipsideViewControllerDidFinish:(FlipsideViewController *)controller
{
    [self dismissModalViewControllerAnimated:YES];
}

– (IBAction)showInfo:(id)sender
{    
    [self presentModalViewController:self.flipController animated:YES];
}

@end

In the @interface portion of the implementation file, we’ve declared an NSArray to hold the names of polygons having 3 to 12 sides as NSStrings. The next step is to synthesize the properties.

Now look at viewDidLoad. This method is called after the view is loaded into memory. We set up the polyNames array, then instantiate flipController. There is a protocol declared in FlipsideViewController that we need MainViewController to handle: we set flipController’s delegate to be the object that is created from MainViewController’s class in the AppDelegate. (The delegate method is flipsideViewControllerDidFinish:, defined a bit lower in the file.) After setting the delegate, we define the kind of transition we want when the flipController’s view is displayed. The UIModalTransitionStyleFlipHorizontal transition will give the illusion that the two views are two sides of the same view, flipping about the vertical axis.

The stepperChanged: method simply sets the lbPolygon’s text to the object in the polyNames array corresponding to the current value of the stepper control minus 3. Subtracting 3 is necessary due to the fact that NSArrays (like all C arrays) are zero – based: a stepper value of 3 corresponds to a polyNames index of 0, giving the string “Triangle.” Next we cast the value of the stepper from float to int, and create a string (flipKey) from a formatted string using the int value. We then pass this key to the setupFlipsidePropertiesWith: method of the flipController object.

Open FlipsideViewController.xib and drag three UILabel controls to the view. Change their text, and the text of the title bar as shown here, you will also want to change the color of the labels to contrast with the dark background color.

Open FlipsideViewController.h and make these changes:

#import <UIKit/UIKit.h>

@class FlipsideViewController;

@protocol FlipsideViewControllerDelegate
– (void)flipsideViewControllerDidFinish:(FlipsideViewController *)controller;
@end

@interface FlipsideViewController : UIViewController

@property (weak, nonatomic) id <FlipsideViewControllerDelegate> delegate;
@property (strong, nonatomic) IBOutlet UILabel *lbName;
@property (strong, nonatomic) IBOutlet UILabel *lbSidesAngles;
@property (strong, nonatomic) IBOutlet UILabel *lbAngleMeasure;

– (IBAction)done:(id)sender;
– (void)setupFlipsidePropertiesWith:(NSString *)key;

@end

We‘ve added three properties as outlets for our labels, and also declared the setupFlipsidePropertiesWith: method. Return to FlipsideViewController.xib and wire up the labels to their corresponding outlets:

Also notice that the Done bar button is already wired to the done: method. This is set up by the template, so we won’t alter it.

Open FlipsideViewController.m and make the following alterations:

#import "FlipsideViewController.h"

@interface FlipsideViewController ()
{
    NSDictionary *polyDetail;
}
@end

@implementation FlipsideViewController

@synthesize lbName, lbSidesAngles, lbAngleMeasure;
@synthesize delegate = _delegate;

– (void)setupFlipsidePropertiesWith:(NSString *)key
{
    NSLog(@"Called");
    self.lbName.text = [polyDetail objectForKey:key];
    self.lbSidesAngles.text = [NSString stringWithFormat:@"has %@ sides and %@ angles", key, key];
    self.lbAngleMeasure.text = [NSString stringWithFormat:@"each interior angle is %d degrees", 180 – (360 / [key intValue])];
}

– (void)viewDidLoad
{
    [super viewDidLoad];
        // Do any additional setup after loading the view, typically from a nib.
    polyDetail = [NSDictionary dictionaryWithObjectsAndKeys:
                  @"Triangle", @"3",
                  @"Square", @"4",
                  @"Pentagon", @"5",
                  @"Hexagon", @"6",
                  @"Heptagon", @"7",
                  @"Octagon", @"8",
                  @"Enneagon", @"9",
                  @"Decagon", @"10",
                  @"Hendecagon", @"11",
                  @"Dodecagon", @"12",
                  nil];
}

– (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
}

– (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}

#pragma mark – Actions

– (IBAction)done:(id)sender
{
    [self.delegate flipsideViewControllerDidFinish:self];
}

@end

Again, we set up an iVar in the @interface section, this time to hold an NSDictionary object, the keys of which are string representations of the integers 3 – 12, and the values of which are the names of the polygons. After synthesizing the properties, we proceed with the method definitions.

The viewDidLoad: method instantiates the polyDetail dictionary, so that the setupFlipsidePropertiesWith: method can make use of it. This method sets the text values of the three strings on the view.

The done: method (called when the user taps the Done bar button) just calls the delegate method so that MainViewController can dismiss the flipController.

Run the application, and observe what happens when selecting polygons having a different number of sides.

Notice when running this program that you must show the flipside at least once before touching the stepper control, or the values on the flipside won’t correspond to the values in the main view. (the initial values for the Triangle are hard coded). Think about this behavior, and as an exercise, correct it.

Apple releases iOS 6 beta 4 to developers

Apple releases Xcode 45 developer preview, iOS 6 beta 4, Apple TV software betaWe are receiving word that Apple has released beta 4 of the upcoming iOS 6 software, which is expected to be released this fall.

As with previous updates, this update is expected to deliver bug fixes for developers who are testing their applications with the new operating system. As this is the fourth beta of iOS 6, a look back at previous iOS beta runs tells us that we should be nearing a final release as Apple refines the next version of its mobile operating system.

The update is available to developers at Apple’s developer site and includes Xcode 4.5 beta along with device-specific builds for supported iOS devices and the Apple TV. Developers can also update their devices over-the-air from the Settings app; however, there are reports that the update servers are not responding when attempting to check for updates, so YMMV.

Apple releases iOS 6 beta 4 to developers originally appeared on TUAW – The Unofficial Apple Weblog on Mon, 06 Aug 2012 14:15:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

8 clever iPhone headphone tricks from Tekserve

You see them everywhere — the ubiquitous white iPhone headphones. For many people, they’re just a way to listen to your tunes and look cool, but to the Apple Specialists at New York City’s Tekserve, the standard Apple headphones a powerful tool for controlling your iPhone.

Tekserve’s Chris D’Lando served up a tasty platter of eight iPhone headphone tricks, some of which might be old hat to iPhone aficionados, but all deserve another look.

First, did you know that you can summon Apple’s intelligent assistant Siri by pressing and holding the center button on your headphones? This is very helpful when your iPhone is in a pocket or bag and you need to get Siri’s help.

Next, if you’re using Apple’s Camera app, you can squeeze the volume up (+) button to take a photo. This is especially useful if your iPhone is mounted on a tripod and you want the equivalent of a shutter release cable to avoid shaking your iPhone when snapping a photo.

D’Lando also shares three great tips on placing and receiving phone calls. If a phone call comes in and you want to decline it, holding the center button for about two seconds and then releasing it will decline the call. Two beeps give you verification that the call was declined. Next, if you decide to answer the call, just give the center button a squeeze to do so. That same gesture also hangs up your call when you’re done. Finally, if you’re on a call and another call comes in, you can switch to the incoming call (or back to the original call) with a quick squeeze of the center button. Holding that center button for two seconds when another call is coming in will switch to the new call and hang up the original call.

Many iPhone owners who listen to music on their devices probably already know the last three tips, but those in a mood for learning can head on over to the original post and check out numbers 3, 4 and 5.

If you’re in or near NYC, be sure to look into Tekserve Academy for classes they’ve developed to help you get the most out of your iPhone.

8 clever iPhone headphone tricks from Tekserve originally appeared on TUAW – The Unofficial Apple Weblog on Mon, 06 Aug 2012 14:00:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

The role of the Mac at NASA and JPL is shown off by Mars Curiosity mission

Macs are very popular at NASA and JPL

My colleague Steve Sande touched on this subject of all the Macs at the Jet Propulsion Laboratory in an earlier post, and I’ve been doing some digging to find out more about all the Mac love at our space agency and its field centers. JPL is managed by Caltech, but it falls under NASA’s administrative and funding jurisdiction.

I talked to a retired JPL engineer who was using Macs on his desk all the way back to the vintage Macintosh SE. He feels the population of Macs grew when the company started making solid notebooks, like the first MacBook Pro. “People started bringing their own into work, and pretty soon a lot of other people followed. Soon they became almost standard issue at JPL, where they were popular in imaging work, especially creating large mosaics, and when OS X came out there was the added advantage of an OS that was UNIX based.”

The engineer also cited the Pentium floating point division error in the 1990s as a factor in the Mac’s adoption. PowerPC Mac workstations of that era didn’t use the Intel microprocessor and were unaffected by the arithmetic flaw in the Pentium CPU; the flaw was so obscure that it took number theory experiments to expose it, but Intel’s lackluster initial response didn’t sit well with people who might be risking a multimillion-dollar interplanetary probe on the Nth decimal place of a calculation.

Jerry Blackmon, who used to do desktop support at the Goddard Space Flight Center, also cited a bring-your-own-device attitude as part of the Mac movement. “The scientists and engineers can request whatever platform they desire, and they mostly pick Macs. And it isn’t specifically for stuff that runs in X11 either; they use their Macs for everything and emulate when they need to use a Windows app.”

NASA even wrote Photoshop plug-ins so images from the Hubble Space Telescope could be opened on both Macs and PCs. The engineer I talked to says Macs now seem to dominate at JPL, and that is clear from the video from the landing of the Mars Curiosity probe last night. I saw a handful of ThinkPads as well, and some iPads scattered around the consoles. Those appeared to be functioning as extra monitors to keep an eye on spacecraft telemetry.

When someone tells you “Macs are toys,” you might gently remind them that they seem to be pretty popular for the “real work” of helping to bring a $2.6 billion dollar spacecraft 352 million miles down to a precise target. The MSL mission is tasked to explore the geological origins of Mars and perhaps learn if life ever existed there.

Macs were always pretty good at the Lunar Lander game in the dim past, but this is something far beyond that. If you’re also using your Mac in science and engineering, be sure to let us know why in the comments.

The role of the Mac at NASA and JPL is shown off by Mars Curiosity mission originally appeared on TUAW – The Unofficial Apple Weblog on Mon, 06 Aug 2012 13:30:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

eBay Now for iOS offers same-day product delivery in San Francisco

Just when you thought eBay was slowly fading away into obscurity as the online equivalent of a garage sale, the company has rolled out something new called eBay Now. eBay provides users in a beta program (signup form here) with an iOS app with which they can browse and purchase merchandise from a number of local stores and then have the swag delivered to them the same day.

The eBay Now program is only available in the San Francisco area at this time, but the company has managed to partner with a number of retailers including Bloomingdales, Macy’s, Target, and Best Buy.

After selecting your item for purchase from the app, you’re contacted by a “Shopping Assistant” who facilitates the entire transaction by verifying the request, physically purchasing the product for you, and then dropping it off into your hands.

At this time, there’s a $5 delivery fee for each purchase over $25, although beta users get a $15 discount on their first purchase and free delivery on the first three orders. There’s no word on whether eBay will expand this program to other cities, but if it does it will revolutionize shopping by giving everyone their own personal shopper.

Continue reading eBay Now for iOS offers same-day product delivery in San Francisco

eBay Now for iOS offers same-day product delivery in San Francisco originally appeared on TUAW – The Unofficial Apple Weblog on Mon, 06 Aug 2012 13:00:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

IDC: Apple tops in mobile revenue, operating profits

IDC Apple tops in mobile revenue, operating profits

AllThingsD’s John Paczkowski, reporting on some of the numbers released by IDC last week, notes that although Samsung shipped almost double the number of smartphones that Apple did, it makes absolutely no difference because Apple “far outshines its rivals in both revenue and operating profits.”

Apple shipped only 6 percent of the industry total of smartphones and tablets, yet thanks to its immense gross margins the company pulled in 43 percent of the industry’s revenues (above) and 77 percent of the operating profits (below).

Raymond James analyst Tavis McCourt said it best — “Ultimately, profits are the feedstock of innovation; and, innovation drives profits. Until Samsung starts generating more profits than Apple, we would not be overly concerned with who has the unit share lead. Remember, HP and Dell still sell a lot more PCs than Apple sells Macs, but does it matter?”

That sound you hear is Apple laughing all the way to the bank…

IDC Apple tops in mobile revenue, operating profits

Continue reading IDC: Apple tops in mobile revenue, operating profits

IDC: Apple tops in mobile revenue, operating profits originally appeared on TUAW – The Unofficial Apple Weblog on Mon, 06 Aug 2012 12:00:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

Macs abound at NASA/JPL Mars Curiosity mission control

Macs abound at NASA Curiosity mission control

For those of us who stayed up late last night to watch the streaming coverage of the Curiosity rover’s landing on Mars, it was a treat to see the huge numbers of MacBooks, iPads, and even iPhones that were in the control room at NASA’s Jet Propulsion Laboratory in Pasadena, California.

The image above shows one of the EDL Ops (Entry, Descent and Landing Operations) engineers gazing intently at the screen of a MacBook Pro at incoming data. Other photos we’ve seen show a conference room full of engineers and scientists at JPL sitting around a table loaded with MacBook Pros with nary a Lenovo or Dell laptop in sight.

Why the love of Macs? It’s probably because OS X is the “Unix that works,” the mainstream operating system that’s built upon the BSD UNIX beloved by scientists and engineers (and is also certified by the Single UNIX Specification group as an Open Brand UNIX 03 product). Of course, the scientific and engineering community may not be thrilled with the recent shift away from bundling Apple-branded X11 with OS X in Mountain Lion, as that’s often used to run legacy apps. The current X11 solution is the XQuartz open source project, which is heavily supported by Apple.

Be sure to check back later; TUAW’s Mel Martin is following up with a post about more reasons for all of this Apple love at JPL.

[h/t Jeff Gamet]

Continue reading Macs abound at NASA/JPL Mars Curiosity mission control

Macs abound at NASA/JPL Mars Curiosity mission control originally appeared on TUAW – The Unofficial Apple Weblog on Mon, 06 Aug 2012 11:00:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments