yue1liang1chuan 2013-07-12 02:23 采纳率: 0%
浏览 2132

prepareForSegue问题

prepareForSegue不显示pageviewcontroller

- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
if ([[segue identifier] isEqualToString:@"MYSegue"]) {

    // Get destination view
    PDFViewController *pdfviewController = [segue destinationViewController];
    NSString *path = [[NSBundle mainBundle] pathForResource:@"paper" ofType:@"pdf"];
    PageViewController *page = [[PageViewController alloc] initWithPDFAtPath:path];
    pdfviewController= page;
}
}

只显示了导航栏和后退键。
还报出了语法不匹配指针类型的错误。

  • 写回答

1条回答

  • github_25339607 2015-01-17 02:16
    关注

    你到底要传到那个界面?如果是pdfviewcontroller那这样就可以了,顶多传些个参数

    • (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
      {
      if ([[segue identifier] isEqualToString:@"MYSegue"]) {

      // Get destination view
      PDFViewController *pdfviewController = [segue destinationViewController];
      //传参数
      }

    评论

报告相同问题?

悬赏问题

  • ¥15 用matlab 设计一个不动点迭代法求解非线性方程组的代码
  • ¥15 牛顿斯科特系数表表示
  • ¥15 arduino 步进电机
  • ¥20 程序进入HardFault_Handler
  • ¥15 oracle集群安装出bug
  • ¥15 关于#python#的问题:自动化测试
  • ¥20 问题请教!vue项目关于Nginx配置nonce安全策略的问题
  • ¥15 教务系统账号被盗号如何追溯设备
  • ¥20 delta降尺度方法,未来数据怎么降尺度
  • ¥15 c# 使用NPOI快速将datatable数据导入excel中指定sheet,要求快速高效