【发布时间】:2014-07-05 07:03:00
【问题描述】:
我使用了一个类,这个类的超类是 UIView 类,我可以使用 pushviewcontroller 推送到其他视图控制器
.h 文件
@class AppDelegate;
@interface BarButton : UIView
{
AppDelegate *appDelegate;
}
@property(retain,nonatomic)AppDelegate *appDelegaet;
.m 文件
appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
-(IBAction)btn4Click:(id)sender
{
OrderViewController *orderView=[[OrderViewController alloc]
initWithNibName:@"OrderViewController" bundle:nil];
[appDelegate.navObj.navigationController pushViewController:orderView animated:YES];
}
【问题讨论】:
-
AppDelegate 类中的 navObj 是什么。让我知道它的类型或类别。
-
我可以使用自定义类,并且该类超类是此类中的 UIView 类,我可以推送到其他视图控制器代码
-
navObj 是 UINavigationcontroller 对象,可以在 AppDelegate 中声明
标签: iphone ios7 uinavigationcontroller