在我的模板中,我正在做类似的事情
<img class="someClass" src="{{imgURL}}">
Run Code Online (Sandbox Code Playgroud)
图像正确加载但我收到警告:
GET http://localhost:8888/%7B%imgURL%7D%7D 404 (Not Found)
Run Code Online (Sandbox Code Playgroud)
有没有办法来解决这个问题?
我有一个小应用程序,它使用多个部分布局作为初始表视图.一个部分显示Twitter的最新趋势,另一部分显示Twitter的最新故事.当我点击趋势列表中的项目时,我转换到一个新的表格视图控制器,显示有关该趋势的最新推文.在故事部分的根控制器中,我能够在包含图像,链接等的不同视图控制器中显示更多信息.问题是,当我在故事部分中选择任何内容时,我被推送到为趋势部分设置的表视图控制器.我已经命名了每个segue,并为我想要转换到的两个视图都有自定义类,我这样做是为了检查调用哪个segue:
-(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if([[segue identifier] isEqualToString:@"viewTrendsSearch"]) {
//get the controller that we are going to segue to
SearchTrendResultsViewController *strvc = [segue destinationViewController];
//get the path of the row that we want from the table view
NSIndexPath *path = [self.tableView indexPathForSelectedRow];
//here we get the trend object from the array we set up earlier to hold all trends
Trends *results = [currentTrends objectAtIndex:[path row]];
//pass the object that was selected in the table view to the destination view …Run Code Online (Sandbox Code Playgroud)