objective c - How to tell which table cell was clicked from another View Controller? iOS 7 -


I think my question may not seem to be anything more specific on the net.

My status here; I have a table view controller with 5 cells which purely work as buttons that correspond to particular web sites, and each button will push it on a view controller with a web view, the same website Will display.

Instead, with 5 different view controllers in their own web view, there is no way to determine which program was clicked on the basis of the program so that I can see the Web view contexts Can I change the URL? In this way, I only need one view controller and a web view, and on the basis of that particular cell that was selected it will display a separate website in that webview. How can I do this? I still think that this is very easy for 5 very similar view controllers.

See below for my current code and some screen shots.

This code only loads the URL View the Web (Websites. M)

  NSURL * cpaURL = [NSURL URLWithString: @ "http : //www.cpagroup.com.au "]; // Define new URL variable NSURLRequest * myRequest = [NSURLRequest requestWithURL: cpaURL]; // New web page request [cpaWebView loadRequest: myRequest]; // Load request on page cpaWebView.scalesPageToFit = Yes;        

//stack.imgur.com/A28G6.png "alt =" View table and web link ">

Just pass the NSRR string in the website file (), in your selection.

  - (zero) table view: (UITableView *) tableview was selected Avandindappath: (NSIndexPath *) indexPath {// initialize your website class file website obz.Relistring = // array Or something that you referred to in cell data}  

and in your website category, use urlString to load the webview


Comments

Popular posts from this blog

Member with no value in F# -

java - Joda Time Interval Not returning what I expect -

c# - Showing a SelectedItem's Property -