Step 1: Sign-up for a C2DM account with Google Follow the steps here. Normally takes a day or so before you are ready to roll.==> Step 2: Setup your Manifest Overview of the manifest changes: 1. Permission to receive C2DM messages 2. Access to the internet 3. Restrict access to your C2DM messages so no other app can see them 4. Declare a Receiver, that we’ll create later, that will let us...
Check String Contains in objective-c / xCode / iPhone
NSString *string = @"hello World";
if ([string rangeOfString:@"World"].location == NSNotFound) {
NSLog(@"string does not contain World");
} else {
NSLog(@"string contains World!");
}
How to Create Write and Read a file in iphone without using playerprefs in unity3d
it is not that easy to read or write file in iphone we have to give the specific path in order to read or write. here is the sample code using UnityEngine; using System.Collections; using System.IO; using System.Text; public static class GameManager { private static string path; public static void starting () { path = Application.dataPath.Substring (0, Application.dataPath.Length - 20...
How to create iPhone/iPad’s “Slide to Unlock” animation ?
This is how Apple implemented “Slider to Unlock” or “Slide to Power off” animation. In .h file UISlider *slider; BOOL touchIsDown; CALayer *textLayer; – (void)viewDidLoad { self.view.layer.backgroundColor = [[UIColor grayColor] CGColor]; UIImageView *sliderBackView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@”SliderBack1.png”]]; sliderBackView.frame =...
How to create file and read/write Data in iphone/ipad
//Documents Directory Path NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; //Give file Name With Extention to create NSString *savedImagePath = [documentsDirectory stringByAppendingPathComponent:@”FileName.docx”]; [[NSFileManager defaultManager] createFileAtPath:savedImagePath...
How to work with Excel (.xls) files in C#.NET?
1. Add reference to COM object Microsoft.Office.Excel 12.0 or any other available library. 2. Code: using Microsoft.Office.Interop.Excel; private void anyfunction() { Microsoft.Office.Interop.Excel.Application xlapp = new Microsoft.Office.Interop.Excel.Application(); Microsoft.Office.Interop.Excel.Workbook xlWkb = null; Microsoft.Office...
/usr/include/objc/objc-class.h file not found
For this you need to change this import statement to,
#import <objc/runtime.h>
This applies to xCode 4.2 above