[Solved] Get substring from string variable and save to NSMutableArray [closed]

NSString *str = @”M||100|??|L||150|??|S||50″; NSString *stringWithoutBars = [str stringByReplacingOccurrencesOfString:@”||” withString:@” “]; NSMutableArray *array = [[NSMutableArray alloc]initWithArray:[stringWithoutBars componentsSeparatedByString:@”|??|”]]; solved Get substring from string variable and save to NSMutableArray [closed]

[Solved] Selecting Video from Camera Roll [closed]

You can use this: func getMovie() { let selecionadorDeFoto = UIImagePickerController() selecionadorDeFoto.delegate = self selecionadorDeFoto.mediaTypes = [kUTTypeMovie as String] selecionadorDeFoto.allowsEditing = false selecionadorDeFoto.sourceType = .photoLibrary present(selecionadorDeFoto, animated: true, completion: nil) } func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [String : Any]) { // Your code here } 6 solved Selecting Video from Camera Roll [closed]

[Solved] Do I have to pay a fee to distribute a paid app

Actually you don’t have to pay a fee when distributing a new paid app through the App Store, but Apple will only give you 70% of the sales revenue. So the upload doesn’t cost a fee, but from what the user pays for your app you will get only 70%. See here for more details: … Read more

[Solved] Converting a NSString to NSDate

check your date format [dateFormatter setDateFormat:@”yyyy-MM-dd’T’HH:mm:ss.SSS’Z'”]; change into [dateFormatter setDateFormat:@”yyyy-MM-dd’T’HH:mm:ssZ”]; Swift check your date format dateFormatter.dateFormat = “yyyy-MM-dd’T’HH:mm:ss.SSS’Z'” change into dateFormatter.dateFormat = “yyyy-MM-dd’T’HH:mm:ssZ” 1 solved Converting a NSString to NSDate

[Solved] Implicit conversion of ‘NSInteger’ (aka ‘int’) to ‘NSIndexSet *’ is disallowed with ARC

What is that line supposed to do, objectsAtIndexes: will return a array of objects match all the NSIndexPath object wintin the NSIndexSet that is passed as the parameter. Try objectAtIndex: which will return the object at the index given. Cell.textLabel.text = [array objectAtIndex:indexPath.row]; 4 solved Implicit conversion of ‘NSInteger’ (aka ‘int’) to ‘NSIndexSet *’ is … Read more

[Solved] Swift 4 days until date [duplicate]

It would be helpful to see what you’ve tried to give some advice, but nonetheless, you can use NSCalendar’s components to accomplish this. let calendar = Calendar.current let startOfDay1 = calendar.startOfDay(for: date1) let startOfDay2 = calendar.startOfDay(for: date2) let components = calendar.dateComponents([.day], from: startOfDay1, to: startOfDay2) You can customize that above to get more specific minutes … Read more

[Solved] What is the best way to convert an array with NSStrings to NSDecimalNumber?

A very simple Category on NSArray will allow you to use map as seen in other languages @interface NSArray (Functional) -(NSArray *)map:(id (^) (id element))mapBlock; @end @implementation NSArray (Functional) -(NSArray *)map:(id (^)(id))mapBlock { NSMutableArray *array = [@[] mutableCopy]; for (id element in self) { [array addObject:mapBlock(element)]; } return [array copy]; } @end Now you can … Read more