0

Big problem here guys, I'm on the verge of finishing my blog project until I came across a segue issue, I'm trying to display the contents of a blogs web view on a uiwebview in another controller. This is my first time working with MediaRSS and AFNetworking. I have been able to parse the contents before, but am having no luck this time around. All help is greatly appreciated. I keep getting NSIndexPath is not a member of PostLink

override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
    if segue.identifier == "viewpost" {
    let indexPath = tableView.indexPathForSelectedRow()
    let item = items[indexPath!.row]
    let detailViewController = segue.destinationViewController as PostViewController
    detailViewController.postLink = indexPath.postLink
    }
  }
}

UPDATE 9:17PM

Looks like im performing a segue properly, because now my page will go to a blank. Can someone please confirm the parameters I am passing in, I just need someone to look and tell me please

Mike113
  • 33
  • 4

1 Answers1

0

NSIndexPath does not have any member named postLink. I think you mean to write item.postLink.

detailViewController.postLink = item.postLink

I hope item is of some type that has 'postLink' member and it is populated with appropriate value.

Abdullah
  • 7,143
  • 6
  • 25
  • 41
  • Thanks for the input everyone. I changed my code to this: **detailViewController.link = link** – Mike113 Apr 16 '15 at 05:00
  • This is producing the blank page, **link** is the parameter I am passing into my webViewController. My analysis is that I am not passing the link parameter in properly. **To Clarify** I am trying to parse **** from **XML** feed, So the user is directed to that webpage – Mike113 Apr 16 '15 at 05:06
  • What is the type of item? And what is the content of link when you debug through segue code? You may also need to check the initial methods viz. viewDidLoad/viewDidAppear etc of PostViewController where you are trying to do initialization. Are you setting the postLink to UIWebView.url in PostViewController? – Abdullah Apr 16 '15 at 05:12
  • Also could you update the question with the new code? – Abdullah Apr 16 '15 at 05:12
  • I went ahead and created a picture of my map function, Would appreciate it very much if you could check it out **UPDATED CODE**[link](http://i.imgur.com/q7L3dc7.png) [link](http://i.imgur.com/UldkDtm.png) – Mike113 Apr 16 '15 at 05:34
  • Ive uploaded the portion of code where I am mapping the string, and where I am calling it out, I hope someone can call out my mistake – Mike113 Apr 16 '15 at 05:39
  • I can post my code if you think it might make a difference, im just so flustered on this one – Mike113 Apr 16 '15 at 06:03
  • Hey Mike, it would be great if we can move this to a chat. I think I need more info about what are you trying to achieve and where is the problem. I see in your code snapshot that you are not using link variable anywhere. – Abdullah Apr 16 '15 at 06:49
  • Yea definitely,that would be great. Can I IM you possibly? stackoverflow wont allow me to move to chat yet – Mike113 Apr 16 '15 at 06:58
  • Im curious as to where I havent made reference to link. I have it in my converitemtoRSS function – Mike113 Apr 16 '15 at 07:06