Sep 23, 2014

Level Up Kanji

Level Up Kanji



Category: Games
Released: Sep 17, 2014
Version: 1.0.0
Size: 9.9 MB
Language: English

Link: iTunes

Aug 20, 2014

HiraKata Quiz

HiraKata Quiz




Category: Games
Released: Aug 19, 2014
Version: 1.0
Size: 0.6 MB
Language: English

Link: iTunes

Aug 5, 2014

CODING CONVENTIONS FOR OBJCTIVE-C

THANK YOU FOR CLOVER STUDIO




 **********************************************
 *                     CODING CONVENTIONS                     *
 **********************************************

 A. CODING RULES

    1. Each class or category has it's own file
        
        MyClass.h
        MyClass.m
        MyClass+Category.h
        MyClass+Category.m
        
    2. Each class or category has it's own group in project explorer
    
        ∆ Classes Folder
            ∆ MyClass
                MyClass.h
                MyClass.m
              ∆ MyClass+Category
                    MyClass+Category.h
                    MyClass+Category.m
            ∆ TestClass
                TestClass.h
                TestClass.m
                
    3. Never use duplicated code, instead copy/pasting create new method

Jul 31, 2014

CrazyKanji



CrazyKanji

Category: Games
Released: Jul 30, 2014
Version: 1.0
Size: 0.3 MB
Language: English

Link iTunes

Jul 17, 2014

[iOS] How To Read a File From Your Application Bundle

First you need to add your file to the Resources folder of your Xcode project. Then you can access the file like this (assuming the file is called MyFile.txt):

NSString *filePath = [[NSBundle mainBundle] pathForResource:@"MyFile" ofType:@"txt"];
NSData *myData = [NSData dataWithContentsOfFile:filePath];
if (myData) {
    // do something useful
}  

Here’s a complete example reading a help text file into a UIWebView.

NSString *filePath = [[NSBundle mainBundle] pathForResource:@"HelpDoc" ofType:@"htm"];
NSData *htmlData = [NSData dataWithContentsOfFile:filePath];
if (htmlData) {
    [webView loadData:htmlData MIMEType:@"text/html" textEncodingName:@"UTF-8" baseURL:[NSURL URLWithString:@"http://iphoneincubator.com"]];
}  

If you want to read the file into a string, which you can then display in a UITextView, for example, then do this:

NSString *filePath = [[NSBundle mainBundle] pathForResource:@"important" ofType:@"txt"];
if (filePath) {
    NSString *myText = [NSString stringWithContentsOfFile:filePath];
    if (myText) {
        textView.text= myText;
    }

[iOS] Getting current device language in iOS?

NSString * language = [[NSLocale preferredLanguages] objectAtIndex:0]; 
Or

NSUserDefaults* userDefaults = [NSUserDefaults standardUserDefaults];
NSArray* arrayLanguages = [userDefaults objectForKey:@"AppleLanguages"];
NSString* currentLanguage = [arrayLanguages objectAtIndex:0]; 

Or

NSString *language = [[[NSBundle mainBundle] preferredLocalizations] objectAtIndex:0];

Jul 10, 2014

[iOS] how to clear notifications?

[[UIApplication sharedApplication] setApplicationIconBadgeNumber: 0];
[[UIApplication sharedApplication] cancelAllLocalNotifications];

Jul 1, 2014

[iOS 8] iOS registerForRemoteNotificationTypes: is not supported in iOS 8.0 and later

Its very simple try this (Xcode6 Beta only):

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    //-- Set Notification
        if ([[[UIDevice currentDevice] systemVersion] floatValue] >= 8.0)
        {
            [[UIApplication sharedApplication] registerUserNotificationSettings:[UIUserNotificationSettings settingsForTypes:(UIUserNotificationTypeSound | UIUserNotificationTypeAlert | UIUserNotificationTypeBadge) categories:nil]];
            [[UIApplication sharedApplication] registerForRemoteNotifications];
        }
        else
        {
            [[UIApplication sharedApplication] registerForRemoteNotificationTypes:
             (UIUserNotificationTypeBadge | UIUserNotificationTypeSound | UIUserNotificationTypeAlert)];
        }
     //--- your custom code
     return YES;
}

Jun 21, 2014

[iOS] DEBUG mode in code

Check your projects build settings for debug to ensure that 'DEBUG' is being set - do this by selecting the project and clicking on the build settings tab. Search for 'DEBUG' and look to see if indeed DEBUG is being set.


then conditionally code for DEBUG in your source files

#ifdef DEBUG
// Something to log your sensitive data here
#else
//
#endif

Jun 19, 2014

Say Ah



Say Ah


Category: Education
Released: Jun 18, 2014
Version: 1.0.0
Size: 32.0 MB
Language: English

Link: iTunes


Jun 7, 2014

[iOS] validate Url from NSString

- (BOOL) validateUrl: (NSString *) url

{  

     NSString *theURL =@"(http|https)://((\\w)*|([0-9]*)|([-|_])*)+([\\.|/]((\\w)*|([0-9]*)|([-|_])*))+";

     NSPredicate *urlTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", theURL];
    return [urlTest evaluateWithObject:url];
 }

Jun 5, 2014

[iOS] Get the screen width and height

If you need the screen size, you should look at the object that represents the screen itself, like this:
CGRect screenRect = [[UIScreen mainScreen] bounds];CGFloat screenWidth = screenRect.size.width;CGFloat screenHeight = screenRect.size.height;
Or
+ (CGFloat) window_height   {
    return [UIScreen mainScreen].applicationFrame.size.height;
}
+ (CGFloat) window_width   {
    return [UIScreen mainScreen].applicationFrame.size.width;

Jun 2, 2014

[iOS] image With Color


- (UIImage *)imageWithColor:(UIColor *)color {
    CGRect rect = CGRectMake(0, 0, 60, 60);
    UIGraphicsBeginImageContextWithOptions(rect.size, NO, 0);    [color setFill];
    UIRectFill(rect);
    UIImage *image = UIGraphicsGetImageFromCurrentImageContext();    UIGraphicsEndImageContext();  
    return image;
}

[iOS] Validation email from string


+ (BOOL) isEmailFormat:(NSString *)email
{
    NSString *emailRegEx =
    @"(?:[A-Za-z0-9!#$%\\&'*+/=?\\^_`{|}~-]+(?:\\.[A-Za-z0-9!#$%\\&'*+/=?\\^_`{|}"
    @"~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\"
    @"x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[A-Za-z0-9](?:[a-"
    @"z0-9-]*[A-Za-z0-9])?\\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?|\\[(?:(?:25[0-5"
    @"]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-"
    @"9][0-9]?|[A-Za-z0-9-]*[A-Za-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21"
    @"-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])";    NSPredicate *regExPredicate = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", emailRegEx];
    BOOL myStringMatchesRegEx = [regExPredicate evaluateWithObject:email];
    NSLog(@"check email result %i",myStringMatchesRegEx);
    return myStringMatchesRegEx;
}

May 30, 2014

Word Look - English



Word Look - English

Category: Education
Updated: May 29, 2014
Version: 1.1.0
Size: 4.2 MB
Language: English

Link: itunes

May 29, 2014

FaCal


FaCal
Category: Games
Updated: May 23, 2014
Version: 1.1.0
Size: 3.3 MB
Language: English

Link: iTunes

May 27, 2014

Fast food objective-c (part 11) : Categories

Categories are one of the most useful features of Objective-C. Essentially, a category allows you to add methods to an existing class without subclassing it or needing to know any of the details of how it's implemented. 

Fast food objective-c (part 10) : Calling Methods on Nil

In Objective-C, the nil object is the functional equivalent to the NULL pointer in many other languages. The difference is that you can call methods on nil without crashing or throwing an exception. 

Fast food objective-c (part 9) : Properties

When we wrote the accessor methods for caption and author earlier, you might have noticed that the code is straightforward, and could probably be generalized. 

Properties are a feature in Objective-C that allow us to automatically generate accessors, and also have some other side benefits. Let's convert the Photo class to use properties. 


Fast food objective-c (part 8) : Logging

Logging messages to the console in Objective-C is very simple. In fact, the NSLog() function is nearly identical to the C printf() function, except there's an additional %@ token for objects.

NSLog ( @"The current date and time is: %@", [NSDate date] );

You can log an object to the console. The NSLog function calls the description method on the object, and prints the NSString which is returned. You can override the description method in your class to return a custom string.

Fast food objective-c (part 7) : More on Memory Management

Objective-C's memory management system is called reference counting. All you have to do is keep track of your references, and the runtime does the actual freeing of memory. 
In simplest terms, you alloc an object, maybe retain it at some point, then send one release for each alloc/retain you sent. So if you used alloc once and then retain once, you need to release twice.
learnobjectivec-referencecounting

Fast food objective-c (part 6) : Class Implementation

Class Implementation

Let's create an implementation, starting with the getters:
#import "Photo.h"

@implementation Photo
    
- (NSString*) caption {
    return caption;
}

- (NSString*) photographer {
    return photographer;
}

@end

Fast food objective-c (part 5) : Designing a Class Interface

Designing a Class Interface

learnobjectivec-editorwindowinset
The Objective-C syntax for creating a class is very simple. It typically comes in two parts. 
The class interface is usually stored in theClassName.h file, and defines instance variables and public methods. 
The implementation is in the ClassName.m file and contains the actual code for these methods. It also often defines private methods that aren't available to clients of the class. 
Here's what an interface file looks like. The class is called Photo, so the file is namedPhoto.h:
 
#import <Cocoa/Cocoa.h>
@interface Photo : NSObject {
NSString* caption;
NSString* photographer;
}

@end 
First, we import Cocoa.h, to pull in all of the basic classes for a Cocoa app. The#import directive automatically guards against including a single file multiple times. 
The @interface says that this is a declaration of the class Photo. The colon specifies the superclass, which is NSObject
Inside the curly brackets, there are two instance variables: caption and photographer. Both are NSStrings, but they could be any object type, including id. 
Finally, the @end symbol ends the class declaration.

Add Methods

Let's add some getters for the instance variables:
#import <Cocoa/Cocoa.h>
@interface Photo : NSObject {
NSString* caption;
NSString* photographer;
}
caption;
-
photographer;
@end

Remember, Objective-C methods typically leave out the "get" prefix. A single dash before a method name means it's a instance method. A plus before a method name means it's a class method. 
By default, the compiler assumes a method returns an id object, and that all input values are id. The above code is technically correct, but it's unusual. Let's add specific types for the return values:
#import <Cocoa/Cocoa.h>
@interface Photo : NSObject {
NSString* caption;
NSString* photographer;
}
- (NSString*) caption;
- (
NSString*) photographer;
@end
Now let's add setters:
#import <Cocoa/Cocoa.h>
@interface Photo : NSObject {
NSString* caption;
NSString* photographer;
}
- (NSString*) caption;
- (NSString*) photographer;
- (void) setCaption: (NSString*)input;
- (void)
setPhotographer: (NSString*)input;
@end
Setters don't need to return a value, so we just specify them as void.​

Fast food objective-c (part 4) : Basic Memory Management

Basic Memory Management

learnobjectivec-objectwithrefcount
If you're writing an application for Mac OS X, you have the option to enable garbage collection. In general, this means that you don't have to think about memory management until you get to more complex cases. 
However, you may not always be working with an environment that supports garbage collection. In that case, you need to know a few basic concepts. 
If you create an object using the manual alloc style, you need to release the object later. You should not manually release an autoreleased object because your application will crash if you do. 
Here are two examples:
// string1 will be released automatically
NSString* string1 = [NSString
string]; // must release this when done
NSString* string2 = [[NSString
alloc] init];
[string2
release];
For this tutorial, you can assume that an automatic object will go away at the end of the current function. 
There's more to learn about memory management, but it will make more sense after we look at a few more concepts.

Fast food objective-c (part 3) : Creating Objects

Creating Objects

There are two main ways to create an object. The first is the one you saw before:
NSString* myString = [NSString string];
This is the more convenient automatic style. In this case, you are creating an autoreleased object, which we'll look at in more detail later. In many cases, though, you need to create an object using the manual style:
NSString* myString = [[NSString alloc] init];

This is a nested method call. The first is the alloc method called on NSString itself. This is a relatively low-level call which reserves memory and instantiates an object. 
The second piece is a call to init on the new object. The init implementation usually does basic setup, such as creating instance variables. The details of that are unknown to you as a client of the class. 
In some cases, you may use a different version of init which takes input:
NSNumber* value = [[NSNumber alloc] initWithFloat:1.0];

Fast food objective-c (part 2) : Accessors

Accessors

All instance variables are private in Objective-C by default, so you should use accessors to get and set values in most cases. There are two syntaxes. This is the traditional 1.x syntax:
[photo setCaption:@"Day at the Beach"];
output = [photo
caption];
The code on the second line is not reading the instance variable directly. It's actually calling a method named caption. In most cases, you don't add the "get" prefix to getters in Objective-C. 
Whenever you see code inside square brackets, you are sending a message to an object or a class.

Dot Syntax

The dot syntax for getters and setters is new in Objective-C 2.0, which is part of Mac OS X 10.5:
photo.caption = @"Day at the Beach";
output = photo
.caption;
You can use either style, but choose only one for each project. The dot syntax should only be used setters and getters, not for general purpose methods.

Fast food objective-c (part 1) : Calling Methods

Objective-C is the primary language used to write Mac software. If you're comfortable with basic object-oriented concepts and the C language, Objective-C will make a lot of sense. If you don't know C, you should read the C Tutorial first. 
This tutorial is written and illustrated by Scott Stevenson.

Calling Methods

To get started as quickly as possible, let's look at some simple examples. The basic syntax for calling a method on an object is this:
[object method];
[object
methodWithInput:input];
Methods can return a value:
output = [object methodWithOutput];
output = [object
methodWithInputAndOutput:input];
You can call methods on classes too, which is how you create objects. In the example below, we call the string method on the NSString class, which returns a new NSString object:
id myObject = [NSString string];
The id type means that the myObject variable can refer to any kind of object, so the actual class and the methods it implements aren't known when you compile the app. 
In this example, it's obvious the object type will be an NSString, so we can change the type:
NSString* myString = [NSString string];
This is now an NSString variable, so the compiler will warn us if we try to use a method on this object which NSString doesn't support. 
Notice that there's a asterisk to the right of the object type. All Objective-C object variables are pointers types. The id type is predefined as a pointer type, so there's no need to add the asterisk.

Nested Messages

In many languages, nested method or function calls look like this:
function1 ( function2() );
The result of function2 is passed as input to function1. In Objective-C, nested messages look like this:
[NSString stringWithFormat:[prefs format]];
Avoid nested nesting more than two message calls on a single line, as it easily gets unreadable.

Multi-Input Methods

Some methods take multiple input values. In Objective-C, a method name can be split up into several segments. In the header, a multi-input method looks like this:
-(BOOL)writeToFile:(NSString *)path atomically:(BOOL)useAuxiliaryFile;
You call the method like this:
BOOL result = [myData writeToFile:@"/tmp/log.txt" atomically:NO];


These are not just named arguments. The method name is actually writeToFile:atomically: in the runtime system.​

[iOS] random Color


+ (UIColor*) randomColor
{
    float red   = arc4random() % 256;
    float green = arc4random() % 256;
    float blue  = arc4random() % 256;
  
    return [UIColor colorWithRed:red/255.0 green:green/255.0 blue:blue/255.0 alpha:1.0];
}

May 26, 2014

[iOS] is Numeric ?

The simplest way to get to know one string is a number.

+ (BOOL) isNumeric:(NSString *)str
{
    NSScanner *sc = [NSScanner scannerWithString: str];
    if ( [sc scanFloat:NULL] )
    {
        return [sc isAtEnd];
    }
    return NO;

}

Fx Stencil

Fx Stencil

  • Category: Photo & Video
  • Updated: May 20, 2014
  • Version: 1.1.0
  • Size: 4.1 MB
  • Language: English
Link : iTunes

[iOS] detectIPhone or iPad

+ (BOOL) detectIPhone
{
    if([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone){
        return YES;
    }else{
        return NO;
    }

}


Use function userInterfaceIdiom of class UIDevice to detect iPhone or iPad.

May 25, 2014

[iOS] detected iOS 5, 6 & 7

Find version iOS, use function [UIDevice currentDevicesystemVersion] 
____________________________________________________________

+ (BOOL) isIOS7
{
    NSString *version = [[UIDevice currentDevice] systemVersion];
    if ([version floatValue] >= 7.0) {
        return YES;
    }else {
        return NO;
    }
}

____________________________________________________________

+ (BOOL) isIOS6
{
    NSString *version = [[UIDevice currentDevice] systemVersion];
    if ([version floatValue] >= 6.0 && [version floatValue] < 7.0) {
        return YES;
    }else {
        return NO;
    }
}

____________________________________________________________


+ (BOOL) isIOS5
{
    NSString *version = [[UIDevice currentDevice] systemVersion];
    if ([version floatValue] >= 5.0 && [version floatValue] < 6.0) {
        return YES;
    }else {
        return NO;
    }
}