CategoryiOS

Load UITableView images in background Asynchronously ?

L

UIImageView *SponsorLogo = [[UIImageView alloc] initWithFrame:CGRectMake(15, 90, 40, 40)]; dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_BACKGROUND, 0), ^(void) { NSData *data0 = [NSData dataWithContentsOfURL:[NSURL URLWithString:@“your_image_URL_Here”]]; UIImage *image = [UIImage imageWithData:data0]; dispatch_sync(dispatch_get_main_queue(), ^(void) { SponsorLogo.image =...

How to define core location manager method in iOS 8?

H

Step 1: Add following key and value in Info. plist of your project. 1. Key – NSLocationWhenInUseUsageDescription Value- This will be used to obtain or track your location. 2. Key -NSLocationAlwaysUseUsageDescription value- This will be used to obtain or track your location. Step 2 : add following line where you want to declare or initialise core location . if ([locationManager...

Adding Event to Native calendar in iOS

A

Add Eventkit framework to your project //Code Snippet: EKEventStore *store; store=[[EKEventStore alloc] init]; //for iOS 7.0 and above we need to have the permission of user for using eventkit that is the calendar //ask for permission: [store requestAccessToEntityType:EKEntityTypeEvent completion:^(BOOL granted, NSError *error) { // handle access here if(granted) { //configure event: EKEvent...

Speech to text conversion in iOS

S

There are lots of Speech to text conversion techniques are available but each one have their pros and cons. The Google Speech API is more convenient. I tried lot of ways for the conversion, but Google  API is more efficient and quite easy but having insufficient documentation. I found that the API accepts flac encoded audio file, but in iOS the flac format is not supported. Finally I found the...

How to post custom facebook stories to timeline

H

1.Create a facebook app & setup app id with your project. 2.create your own story from facebook app opengraph section by creating action & object. 3.Post one story to app owner timeline & submit it to the facebook review team so that it will be become public for app user & can be seen publicaly on timeline follwing code shows the how to post the story. -(void)Poststory { NSString...

Moving view along with fingure touch

M

You can move any view inside your viewcontroller simply adding pangestureRecogniser -(void)ViewDidLoad { //add pangesture recognise to your moving view UIPanGestureRecognizer *mSwipeUpRecognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handletapgesture:)]; [mSwipeUpRecognizer setMaximumNumberOfTouches:1]; [mSwipeUpRecognizer setMaximumNumberOfTouches:1]; [Yourview...

Handling Push Notification in iOS

H

The push notification is quite complex part to handle. Get it done in only Three easy steps 1] Register for push notification 2] Get Device token 3] Implement delegate methods to handle push notification   1] Register for push notification – (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // register for remote notification...

Adding multiple uicontrollers on view

A

If we create multiple controllers programmatically, we generally use for loop but we can add the same controllers by using the methods, example: 1. By using for loop   for (int i = 0; i < 3; i++) { UITextField *textField= [[UITextField alloc] initWithFrame:CGRectMake(50, 20+40*i, 117, 30)]; textField.borderStyle = UITextBorderStyleRoundedRect; textField.font = [UIFont...

Category