Tag: ios

How to use NSPredicate with chained virtual property?

Assume two ManagedObject backed by Sqlite: 1.) A User which has two properties, firstname and lastname and a virtual (transient) property fullname which is read-only. @interface User : NSManagedObject … @property NSString *firstname; @property NSString *lastname; @property (readonly) NSString *fullname; @end @implementation User … – (NSString*)fullname { return [NSString stringWithFormat:@”%@ %@”, self.firstname, self.lastname]; } @end […]

Core Data / NSFetchedResultsController – Registering changed objects related to the fetched object

I use a NSFetchedResultsController to get a list of objects which is displayed in a UITableView. If I change values in the objects the whole thing triggers and automatically reloads the changed rows. But one of the displayed values comes from related objects (one-to many relationship). Those objects have a transient title (so it’s value […]

CoreData iOS – How to create unique ID for objects?

I have a project in IOS for iPhones and iPads and such. For the project I am using CoreData to hold the data the user feeds in the app. For ease of understanding lets say its like a contacts app. So basically you know you have your name, work, phone etc. Well this app also […]

How to get latitude and longitude of an image using PHAsset in iOS?

I am trying to fetch images from photo library within the range of two dates and I am getting the images successfully. And I am also getting the info of the image by using below code. PHContentEditingInputRequestOptions *options = [[PHContentEditingInputRequestOptions alloc] init]; options.networkAccessAllowed = YES; //download asset metadata from iCloud if needed [asset requestContentEditingInputWithOptions:options completionHandler:^(PHContentEditingInput […]

Call Receive to receiver to play sound

Call rececive to play sound in recevier speacker but not error accer and not sound play any one speacker in device to plz solution this problem. NSString *voice=[[NSUserDefaults standardUserDefaults] objectForKey:TB_Voice_conversation_value]; NSError *error; BOOL Errors; NSString *filePath = [[[NSBundle mainBundle] bundlePath] stringByAppendingPathComponent:voice]; NSURL *myFileURL = [NSURL fileURLWithPath:filePath]; AVAudioPlayer *player = [[AVAudioPlayer alloc] initWithContentsOfURL:myFileURL error:nil]; [player setDelegate:self]; […]

iOS 9 cancelLocalNotification problems

I’ve had an app on the App Store for over a year now which uses UILocalNotifications to act as reminders. The UILocalNotifications use the repeatInterval, set to NSCalendarUnitMinute, to keep reminding the user of whatever they wanted to be reminded of. Everything was fine with the app when building against iOS 7/8 but now that […]

AWS SES sending mail with attachement using Amazon iOS SDK

Does anyone know how to send a mail with an attachment using Amazon SES with the iOS SDK.

GIF image not show

I follow this post to show GIF image. I have tried: #import “ViewController.h” @interface ViewController () @end @implementation ViewController – (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. UIImageView* animatedImageView = [[UIImageView alloc] initWithFrame:self.view.bounds]; animatedImageView.animationImages = [NSArray arrayWithObjects: [UIImage imageNamed:@”splash.gif”], nil]; animatedImageView.animationDuration = 6.0f; animatedImageView.animationRepeatCount = […]

Obstacles With GameplayKit

Here is my question: How can I convert an SKSpriteNodearray into an array of GKObstacles so that an agent can appropriately avoid these obstacles by using the goalToAvoidObstacles:(nonnull NSArray<GKObstacle *> *) maxPredictionTime:(NSTimeInterval)/? It seems that the way in which I am creating the GKObstacle array is not allowing the GKGoal to identify these as obstacles […]

change the background color of customize tableViewCell

I want to change my cell’s background color I see other question but they are not correspond my situation I want to do a notification tableView for example,If user have read cell, the cell’s background color will change to white If not, the color is yellow At beginning I set color in -(void)tableView:(UITableView*)tableView cellForRowAtIndexPath:(NSIndexPath*)indexPath{ if(read[[indexPath […]