How can i insert data to UITableView from my site?
Hey there, I'm new to iPhone development so I'll need your help here, What I'm planning to do is to create an iPhone application for my website, My website lets people find stores sorted by categories, So I want to create an application that does the same thing, for example: the first window will let them select a category, then they will see a table with all of the stores that I have in the website.
I was planning on making a PHP file that will show the stores list in XML, PHP isn't my problem, I just need to know how to get the contents from the php file and place each store in a table cell..
I tried to search for tutorials for this but i couldnt find any good tut开发者_运维百科orial,
Thanks in advance..
I had the same issues when I started iPhone development. It gave me a headache, where to start and how to get things done with Objective-C.
Maybe the post iOS: Parsing XML file using APXML Library helps. You could exchange the URL query with your php and pass your own values.
For example:
NSString * phpUrl = [NSString stringWithFormat:@"%@%@", @"http://www.yourdomain.org/storequery.php?category=", userselectedcategorystring];
NSString *xmlString = [NSString stringWithContentsOfURL: [NSURL URLWithString:phpUrl] encoding:NSUTF8StringEncoding];
UPDATE: If you are looking for an step-by-step tutorial for creating UITableViews, have a look at DEREK's TableViews tutorial.
Hope this helps. Best, Martin
精彩评论