iOS set NSURL with Entity item

160 views Asked by At

Hi i am trying to get the data from my entity and set the nsurl in a different view controller to something saved in my WebsiteTasks Entity and i keep getting an error, if someone could help me thanks, this is what i have.

override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
    if segue.identifier == "showFeeds" {
        var selectedItem: NSManagedObject = WebsiteList[self.tableView.indexPathForSelectedRow()!.row] as NSManagedObject
        let FVC: FeedViewController = segue.destinationViewController as FeedViewController
        let newURL: NSString = selectedItem.valueForKey("websiteLink") as String
        FVC.url = NSURL(string: newURL)!
        }
    }
}

i know this is the problem because i went to my other tableview and set the link manually and took the segue out and it worked fine, let me know thanks!

libswiftCore.dylib`swift_dynamicCastClassUnconditional:
0x10029a504:  cmp    x0, #1
0x10029a508:  b.lt   0x10029a53c               ; swift_dynamicCastClassUnconditional +     56
0x10029a50c:  ldr    x8, [x0]
0x10029a510:  adr    x9, #346968               ; swift_isaMask
0x10029a514:  nop    
0x10029a518:  ldr    x9, [x9]
0x10029a51c:  and    x8, x9, x8
0x10029a520:  cmp    x8, x1
0x10029a524:  b.eq   0x10029a534               ; swift_dynamicCastClassUnconditional + 48
0x10029a528:  ldr    x8, [x8, #8]
0x10029a52c:  cbnz   x8, 0x10029a520           ; swift_dynamicCastClassUnconditional + 28
0x10029a530:  b      0x10029a53c               ; swift_dynamicCastClassUnconditional + 56
0x10029a534:  cbz    x0, 0x10029a53c           ; swift_dynamicCastClassUnconditional + 56
0x10029a538:  ret    
0x10029a53c:  brk    #1
0

There are 0 answers