plist

Trying To Call PList data in a for Loop (iOS)

笑着哭i 提交于 2020-01-17 07:20:07
问题 I have, what I believe to be a simple question with a simple answer that I cannot figure out for the life of me. I've created a plist that I'm trying to use to populate a MapView annotation with info. I've gone through some tutorials and this is the code I've decided to go with (running a loop). It wasn't showing the pins on the map so I decided to set up NSLogs at different point throughout the code to find the problem and if you look at the code below, it logs out "read1" but not "read2" so

number of rows in section

隐身守侯 提交于 2020-01-17 07:10:23
问题 I have a table view which populates from a plist. in a plist I have a Categories array: Catgeories - Array item 0 - Maths item 1 - English .... in the same plist i have a Notes array Notes - Array item 0 - Dictionary Title - My maths note 1 Text - This is algebra Category - Maths item 1 - Dictionary Title - My English Text - This is algebra Category - English in number of sections i have... - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { // Return the number of sections.

Save and Get image from plist

生来就可爱ヽ(ⅴ<●) 提交于 2020-01-17 03:59:16
问题 I am developing one app in that getting images from array and display vertically in ScrollView. when user double tapped on particular image i want that exact image store into plist according to tag value of that image, and retrieve that image later on when require. i tried this one // Store Data into plist. NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *path = [NSString stringWithFormat:@"%@/myPlist.plist", [paths objectAtIndex:0]];

Cannot Feed UITableView with .plist

房东的猫 提交于 2020-01-16 19:21:06
问题 I am a beginner and have a probably quite simple question. I browsed through similar topics and lost a day without finding a solution. I have a Master and Detail view controllers. I created a .plist as shown below. Now I would like feed UITableView with these data. And here the problem is. I can't take continents names. All the time I see blank cells or I get some errors. Maybe I should change something in the plist? Here is my code: MasterViewController.h: @interface MasterViewController :

Nesting arrays into NSDictionary object (Objective-C)

三世轮回 提交于 2020-01-16 18:59:24
问题 I would like to define tasks using NSDictionary, which I'd like to save in a plist file (I didn't have much luck with Core Data so far), but got stuck at two points: -- When using initWithObjectsAndKeys: I can change the data type to number or boolean, using NSDate's numberWithInt: and numberWithBool: methods, respectively. I can't seem to find the method to change the type to date though. I couldn't find anything like that in the documentation. -- The second problem I ran into was with the

Nesting arrays into NSDictionary object (Objective-C)

醉酒当歌 提交于 2020-01-16 18:58:09
问题 I would like to define tasks using NSDictionary, which I'd like to save in a plist file (I didn't have much luck with Core Data so far), but got stuck at two points: -- When using initWithObjectsAndKeys: I can change the data type to number or boolean, using NSDate's numberWithInt: and numberWithBool: methods, respectively. I can't seem to find the method to change the type to date though. I couldn't find anything like that in the documentation. -- The second problem I ran into was with the

Checkbox in UITableView Cell

我怕爱的太早我们不能终老 提交于 2020-01-15 19:14:38
问题 I've written an app which list the title, a thumbnail and the second-hand price of some books. It's all done using a UITableView and the data is taken from a .plist file. What I want to add is a checkbox to each cell which can be toggled if the user has the book or not and then store that checkbox state for the next time they use the app. Is it possible to store a value back to the .plist file or is there another way to do it? Here's the code I have so far for the cell: @implementation

UITableView grouped and .plist

左心房为你撑大大i 提交于 2020-01-15 19:14:08
问题 I wanted to make a sectioned UITableView using plist. Originally, my plist was structured this way: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <array> <dict> <key>name</key> <string>First</string> <key>description</key> <string>First</string> <key>image</key> <string>image.png</string> </dict> <dict> <key>name</key> <string>Second</string> <key>description</key> <string

Checkbox in UITableView Cell

梦想与她 提交于 2020-01-15 19:12:30
问题 I've written an app which list the title, a thumbnail and the second-hand price of some books. It's all done using a UITableView and the data is taken from a .plist file. What I want to add is a checkbox to each cell which can be toggled if the user has the book or not and then store that checkbox state for the next time they use the app. Is it possible to store a value back to the .plist file or is there another way to do it? Here's the code I have so far for the cell: @implementation

Determine if software is installed and what version on Mac in Node.js JavaScript

≯℡__Kan透↙ 提交于 2020-01-15 10:14:07
问题 I am in a node environment on Mac within a Electron application and I am needing to: test if Photoshop is installed get version of installed Photoshop launch Photoshop This was all extremely easy to do in windows. I branch on nodejs os modules platform method so if 'Darwin' I need to do the above things. I am not a Mac user so I do not know much about the processes on Mac. I can parse .plist files if need be but poking around users lib preference folder hasn't showed up much. There are