5,336 questions
0
votes
1
answer
78
views
How do I bind an NSMutableArray to an NSPopUpButton
I have an NSPopUpButton defined in my view controller :
@property (weak) IBOutlet NSPopUpButton* popUpButton;
this view controller also has an NSMutableArray which includes some objects of type ...
0
votes
1
answer
61
views
Defining the type of a completionHandler in Objective-C
I can't manage to get the responseCompletion type correct, at the for cycle.
Tried to replace it with typedef, but got no luck, only more errors.
@interface ImageManager : NSObject
//typedef void(^...
0
votes
0
answers
46
views
Core Data using NSArray does not preserve any data after program termination
I'm attempting to configure the transformer to preserve array objects. It was successful to create new data after refreshing data, however when I killed the program and then reopened it, the data was ...
0
votes
1
answer
123
views
How to read an Objective-C array in Swift? It's always returning nil
I have a NSArray declared in .h file as
@interface ClassName : NSObject
{
NSArray *myArray;
}
@property (nonatomic, strong) NSArray *myArray;
@end
In the .m file here is how I have it.
@...
0
votes
1
answer
72
views
Errors on [indexPath!] and [newIndexPath!] - the message "Cannot convert value of type 'NSIndexPath?' to expected element type 'IndexPath'
// Errors on [indexPath!] and [newIndexPath!] ---- the message "Cannot convert value of type 'NSIndexPath?' to expected element type 'Array<IndexPath>.ArrayLiteralElement' (aka 'IndexPath')&...
1
vote
1
answer
65
views
Complex Dictionary Get Values as Strings With Conditions
I have built a survey using laanlabs/SwiftSurvey and I am able to get the results from the surveyComplete method as a dictionary.
The results return in a complex structure and I need to get the values ...
0
votes
0
answers
100
views
Accessing string and int values from JASON data
Parsing a JSON file saved locally,storing JSON data in NSArray and further NSArray storing in id type to print values in table view but getting crash in getting int value like "id" also what ...
0
votes
0
answers
21
views
I am trying to pull the value based on the key in a NSArray in Objective-C that are passed in a URL. How do I get the value form the key? [duplicate]
I am pulling in the components from a NSURL using componentswithurl: resolvingagainstbaseurl:. This gives me an NSArray of query items, but I cannot get the value for each object out of the array ...
1
vote
1
answer
405
views
Swift Printing an Array in a table form String and also adding special characters
Lets assume i have this string
var stringCSV = "Beth,Charles,Danielle,Adam,Eric\n17945,10091,10088,3907,10132\n2,12,13,48,11";
And i converted it into a 2D Array
[["Beth", "...
0
votes
0
answers
267
views
How copy an NSArray into MLMultiArray in Swift?
I have an NSArray of size (1, 5, 401) from a plist file. I want to copy that into MLMultiArray of the same shape and then pass it to a CoreML model in Swift. How can I copy the values from NSArray to ...
0
votes
0
answers
57
views
Iteract through __NSSingleObjectArrayI in Objective-C
I'm getting the below response and how do I iterate or get the values?
<__NSSingleObjectArrayI 0x600002edeea0>(
{
link = "<null>";
ValueG = "%";
ValueT = 1;
...
-2
votes
1
answer
90
views
Parse JsonArray response data
I have an json array respone like this;
[
{
"id": 62,
"type_id": 1,
"coordinate": {
"x": 2273.73828125,
&...
0
votes
0
answers
42
views
Plotting values from an NSArray in MapKit
Edit: added Dump(lat)
Edit2: tried compactMap
I am having trouble retrieving values from an SQL database and plotting longitude and latitude from each row in the database as a new pin on the Map. The ...
0
votes
1
answer
115
views
Xamarin iOS - Why Can't I Iterate or Fetch by Index on an NSArray?
I am trying to either iterate over an NSArray in Xamarin, or fetch items by index as follows :
try
{
NSData value = (NSData)NSUserDefaults.StandardUserDefaults["accounts"];
...
0
votes
1
answer
117
views
NSDictionary count of objects (0) differs from count of keys (1) Crashing app after new Xcode
I have an app which will take a plain text file, and for each question, create an entry in a PLIST file with different choices for answers, etc. I have used this same code for a few years, but for ...