大家好,我写了一个类,没有继承UIViewController,继承了自定义类,所以下面的跳转代码实效:ProductsReservationViewController * productsList = [ProductsReservationViewController alloc];
    [self.navigationController pushViewController:productsList animated:YES];
    [productsList release];
提示错误信息:Property 'navigationController' not found on object of type 'ProductsDetailsCell'请问有其他方式可以实现,跳转到另外一个ViewController吗?谢谢。

解决方案 »

  1.   

    1  你这个问题是你没有指定navigation的根视图。2  你可以用[viewController presentModalViewController:productsList animated:YES] 来代替上面的方法。
      

  2.   

    请问viewController哪里出来的,不需要定义一下吗? 能具体指点一下吗? 我按你的做,提示viewController没有定义
      

  3.   

    .......viewController是我写的一个例子对象。他是你当前视图的一个控制器,即是你要跳转的控制器的父控制器。
      

  4.   

    我啰嗦一下吧  你用的不是 navigationController,只是单纯的页面推进吧
     比如你要推进到一个PlayHistoryViewController这个页面,首先在引用文件#import "PlayHistoryViewController.h"然后再你的推进方法里这样写PlayHistoryViewController *pPlayHistory = [[PlayHistoryViewController alloc] init];
    [self.view presentModalViewController:pPlayHistory animated:YES] 
    [pPlayHistory release];
      

  5.   

    不继承UIViewController且没有使用UINavigationController是不能使用push方法跳转的,你自定义的类都不是一个视图控制器类怎么可以用视图控制器的方法来跳转
      

  6.   


    self.view 提示not found view
      

  7.   

    你写的productsList 继承的是UIView 类吧,[productsList addSubview: viewController.view ];这么写就行了,要跳转再加个视图出现的动画效果就可以了