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.