This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Wednesday, January 2, 2013

Placeit by Breezi Lets You Showcase Prototypes In Realistic Environments

A little tool developed by the folks over at Breezi, a next-gen website builder, allows the presentation of screenshots in realistic environments. Apps are nowadays often prototyped and shown on the virtual screens of iPads, laptops, smartphones and the like, foremost to enable the customer to get an impression of what to expect at project's end. The tool names Placeit is very straight-forward and does not leave you puzzling how to use it. This is what makes it perfect for everyday use.


Source : internetwebsitedesign[dot]biz

Reversing a String in iPhone

Reversing a String in iPhone

Sometimes we want to perform some task on an object that is not included in the methods of that class. An example of this might be reversing the order of characters in an NSString object. While we could certainly do this in code, it would be better if we could add a class method to NSString itself that would reverse any string. In this blog, we’ll use a category to add the string reversal method to NSString.

A category is an Objective – C construct that allows us to add methods to any class, regardless of whether we have the source code for that class. Once we add a category to a class, all the methods in the category are added to all instances of the class in our code. Since categories are maintained in separate files, it is a simple matter to include them in any project where the extended features of the class are desired.

Open Xcode, choose “Create a new Xcode project,” select the Single View Application template, and click Next. Name the project “CategoryDemo,” and choose options as shown here:

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

When the app template has been created, open the ViewController.zib file, and drag controls to the view as shown below:

Note that the first control is a UITextField and the second is a UILabel. Set the UITextField’s return button type to “Done.”

Now we’re going to add the category. Right – Click on the ViewController.zib file, and select New File from the popup menu. Select Objective-C Category as shown here:

Click Next, then name the new category “AddedMethods”. Make sure that the category is on NSString, as shown:

Click Next, then Create. Two new files will be generated with the names NSString+AddedMethods.h and NSString+AddedMethods.m. This file naming convention makes it easy to see categories that we have added.

Open the NSString+AddedMethods.h file and add the declaration for our new class method as shown here:

#import <Foundation/Foundation.h>

@interface NSString (AddedMethods)

+ (NSString *)stringByReversingString:(NSString *)str;

@end

Save the file, and open the NSString+AddedMethods.m file. We’ll be adding the definition for our new class method here, as shown:

#import "NSString+AddedMethods.h"

@implementation NSString (AddedMethods)

+ (NSString *)stringByReversingString:(NSString *)str
{
    char cString[50];
    char revString[50];
    NSString *retval;
    [str getCString:cString
          maxLength:[str lengthOfBytesUsingEncoding:NSUTF8StringEncoding] + 1
           encoding:NSUTF8StringEncoding];
    printf("%s", cString);
   
    for (int i = 0; i < strlen(cString); i++) {
        revString[i] = cString[strlen(cString) - (i + 1)];
    }
    revString[strlen(cString)] = ;
    retval = [NSString stringWithCString:revString encoding:NSUTF8StringEncoding];
     
    return retval;
}

@end

It is much easier to index into C strings and build them up character by character than it would be for NSString objects. In this method, we set up two buffers (char arrays). Then we get a C string representation of the str argument by using the getCString:maxLength:encoding method. In this method, the maxLength parameter must be one more than the number of bytes in the NSString to account for the NULL terminator on C strings.

We then copy each character from the cString to the revString in reverse order (in the for loop). After doing this, we put a NULL terminator ( ‘′) at the end of the reversed string, create a new NSString (retval) from the contents of the reversed string, and return it.

Next, open the ViewController.h file, and make changes as shown below:

#import <UIKit/UIKit.h>
#import "NSString+AddedMethods.h"

@interface ViewController : UIViewController

@property (nonatomic, strong)IBOutlet UILabel *output;

- (IBAction)inputDone:(UITextField *)sender;

@end

We must import the category in order to use it, as shown in the above listing. Declare one outlet for the label, and one action method for the text field. Using Interface Builder, wire up the output outlet to the UILabel object and the inputDone: method to the UITextField’s Did End On Exit event.

After the buttons are wired up to their corresponding methods, open the ViewController.m file and add the statements shown here:

@synthesize output;

- (IBAction)inputDone:(UITextField *)sender
{
    self.output.text = [NSString stringByReversingString:sender.text];
    NSLog(@"%@", self.output.text);
    [sender resignFirstResponder];
}

Add these lines immediately after the @implementation line in the .m file. As always, we synthesize properties, then add methods. The action method sets the output label’s text property to the reversed contents of the input text field’s text property using the stringByReversingString method we just added to the NSString class. After doing this, the method calls resignFirstResponder on the sender, which dismisses the keyboard.

Run the application now, enter a string in the text field, then click the Done button on the keyboard and observe the result.

Categories are a very powerful tool for adding functionality to existing classes. When we add a category to a class, all child classes of that class will inherit the added methods as well. As a further exercise, try to add another method to NSString category we defined that replaces all spaces in a string with underscores!


Source : blancer[dot]com

Programming Textbooks

Programming Textbooks
iPhone Programming
Image by Theen …
A row of nice big colourful textbooks on my husband’s shelf. It is right next to a window and well-lit for photographic purposes. He has a shelf full of books with deep and meaningful content, but this is not it :) The depth will have to rely on the physcial shape of the books and their shadows.

Taken with iPhone 3GS.

Entry for Daily Shoot 446: "Create a photo today that gives a sense of depth or dimension."
www.dailyshoot.com


Source : ducktyper[dot]com

Reversing a String in iPhone

Sometimes we want to perform some task on an object that is not included in the methods of that class. An example of this might be reversing the order of characters in an NSString object. While we could certainly do this in code, it would be better if we could add a class method to NSString itself that would reverse any string. In this blog, we’ll use a category to add the string reversal method to NSString.

A category is an Objective – C construct that allows us to add methods to any class, regardless of whether we have the source code for that class. Once we add a category to a class, all the methods in the category are added to all instances of the class in our code. Since categories are maintained in separate files, it is a simple matter to include them in any project where the extended features of the class are desired.

Open Xcode, choose “Create a new Xcode project,” select the Single View Application template, and click Next. Name the project “CategoryDemo,” and choose options as shown here:

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

When the app template has been created, open the ViewController.zib file, and drag controls to the view as shown below:

Note that the first control is a UITextField and the second is a UILabel. Set the UITextField’s return button type to “Done.”

Now we’re going to add the category. Right – Click on the ViewController.zib file, and select New File from the popup menu. Select Objective-C Category as shown here:

Click Next, then name the new category “AddedMethods”. Make sure that the category is on NSString, as shown:

Click Next, then Create. Two new files will be generated with the names NSString+AddedMethods.h and NSString+AddedMethods.m. This file naming convention makes it easy to see categories that we have added.

Open the NSString+AddedMethods.h file and add the declaration for our new class method as shown here:

#import <Foundation/Foundation.h>

@interface NSString (AddedMethods)

+ (NSString *)stringByReversingString:(NSString *)str;

@end

Save the file, and open the NSString+AddedMethods.m file. We’ll be adding the definition for our new class method here, as shown:

#import "NSString+AddedMethods.h"

@implementation NSString (AddedMethods)

+ (NSString *)stringByReversingString:(NSString *)str
{
    char cString[50];
    char revString[50];
    NSString *retval;
    [str getCString:cString
          maxLength:[str lengthOfBytesUsingEncoding:NSUTF8StringEncoding] + 1
           encoding:NSUTF8StringEncoding];
    printf("%s", cString);
   
    for (int i = 0; i < strlen(cString); i++) {
        revString[i] = cString[strlen(cString) - (i + 1)];
    }
    revString[strlen(cString)] = \0;
    retval = [NSString stringWithCString:revString encoding:NSUTF8StringEncoding];
     
    return retval;
}

@end

It is much easier to index into C strings and build them up character by character than it would be for NSString objects. In this method, we set up two buffers (char arrays). Then we get a C string representation of the str argument by using the getCString:maxLength:encoding method. In this method, the maxLength parameter must be one more than the number of bytes in the NSString to account for the NULL terminator on C strings.

We then copy each character from the cString to the revString in reverse order (in the for loop). After doing this, we put a NULL terminator ( ‘\0′) at the end of the reversed string, create a new NSString (retval) from the contents of the reversed string, and return it.

Next, open the ViewController.h file, and make changes as shown below:

#import <UIKit/UIKit.h>
#import "NSString+AddedMethods.h"

@interface ViewController : UIViewController

@property (nonatomic, strong)IBOutlet UILabel *output;

- (IBAction)inputDone:(UITextField *)sender;

@end

We must import the category in order to use it, as shown in the above listing. Declare one outlet for the label, and one action method for the text field. Using Interface Builder, wire up the output outlet to the UILabel object and the inputDone: method to the UITextField’s Did End On Exit event.

After the buttons are wired up to their corresponding methods, open the ViewController.m file and add the statements shown here:

@synthesize output;

- (IBAction)inputDone:(UITextField *)sender
{
    self.output.text = [NSString stringByReversingString:sender.text];
    NSLog(@"%@", self.output.text);
    [sender resignFirstResponder];
}

Add these lines immediately after the @implementation line in the .m file. As always, we synthesize properties, then add methods. The action method sets the output label’s text property to the reversed contents of the input text field’s text property using the stringByReversingString method we just added to the NSString class. After doing this, the method calls resignFirstResponder on the sender, which dismisses the keyboard.

Run the application now, enter a string in the text field, then click the Done button on the keyboard and observe the result.

Categories are a very powerful tool for adding functionality to existing classes. When we add a category to a class, all child classes of that class will inherit the added methods as well. As a further exercise, try to add another method to NSString category we defined that replaces all spaces in a string with underscores!


Source : edumobile[dot]org

Tuesday, January 1, 2013

Gaming newcomers have little staying power on App Store’s paid chart

Gaming newcomers have little staying power on App Store’s paid chart

It’s getting harder for original gaming properties to gain a foothold on the App Store’s top paid charts, according to a report by BGR. The site points out that a majority of the best-selling paid gaming apps are either a year (or more) old or based on franchises that were established on iOS several years ago. Fresh new titles do make the top 10, but are soon pushed back out by old standbys.

The Angry Birds franchise holds three of the top 20 spots, counting the spin-off Bad Piggies. Other “oldies” such as Plants vs. Zombies, Cut the Rope and Fruit Ninja are regularly among the top 10.

It’s worth noting that the makeup of the free gaming apps chart changes frequently, with a steady stream of new and sometimes innovative titles popping in and out. That’s due to the fact that App Store shoppers feel they can take a chance on these no-risk titles, while when money’s concerned they like to stick with sure things. BGR makes the point that the ability for a more varied slate of titles to stand out in the free chart is likely why many game developers are opting to take the freemium route with their releases.

Gaming newcomers have little staying power on App Store’s paid chart originally appeared on TUAW – The Unofficial Apple Weblog on Tue, 01 Jan 2013 20:00:00 EST. Please see our terms for use of feeds.


Source : blancer[dot]com

Cocoa seedlings in the nursery

Cocoa seedlings in the nursery
Cocoa
Image by IITA Image Library
Potted cocoa seedlings in the nursery. (file name: RCM_353)


Source : ducktyper[dot]com

Zynga shuts down 11 apps, including PetVille and Mafia Wars 2

Zynga shuts down 11 apps, including PetVille and Mafia Wars 2

Zynga has announced that it’s closing 11 different games and apps, presumably just because they’ve failed to live up to the publisher’s expectations. Perhaps the most popular app of the bunch is Petville, which at one point announced that it had over a million users. But there are a few other big titles in the 11 as well: Mafia Wars 2, FishVille, Treasure Isle and Vampire Wars are all getting shut down as well.

The company’s CEO says this is all part of a standard restructuring, and it makes sense that Zynga, which has grown by leaps and bounds over the past few years, would want to emphasize its strengths and minimize its weaker titles. But this is also a sign that the Zynga brand isn’t invincible, and that clearly, the company needs hits to keep itself moving. 2013 may be a rocky year for Zynga, if it can’t replicate the success it’s seen in the past with FarmVille and the other games it’s acquired, like Draw Something and Words with Friends.

Zynga shuts down 11 apps, including PetVille and Mafia Wars 2 originally appeared on TUAW – The Unofficial Apple Weblog on Mon, 31 Dec 2012 18:00:00 EST. Please see our terms for use of feeds.


Source : blancer[dot]com