Uitableviewcontroller or Uiviewcontroller (<UITableViewDataSource,UITableViewDelegate>)
Post viewwillappear: (BOOL) animated not executed
Here's how to fix it:
First, add <UINavigationControllerDelegate> in the *.h header file.
Then add the relevant code to the *.M file.
self.navigationcontroller.delegate=self;
Then use the proxy function of Navigationcontroller at this time, OK.
-(void) Navigationcontroller: (Uinavigationcontroller *) Navigationcontroller Willshowviewcontroller: ( Uiviewcontroller *) Viewcontroller animated: (BOOL) animated
{
[Viewcontroller viewwillappear:animated];
}
-(void) Viewwillappear: (BOOL) animated
{
NSLog (@ "now available");
}
code example:
MyOrders.h
@interface Myorders:uiviewcontroller<uitableviewdatasource,uitableviewdelegate, uinavigationcontrollerdelegate>{
}
@property (nonatomic,retain) iboutlet UITableView *table;
Myorders.m
-(void) viewdidload
{
[Super Viewdidload];
self.navigationcontroller.delegate=self;
}
-(void) Navigationcontroller: (Uinavigationcontroller *) Navigationcontroller Willshowviewcontroller: ( Uiviewcontroller *) Viewcontroller animated: (BOOL) animated
{
[Viewcontroller viewwillappear:animated];
}
-(void) Viewwillappear: (BOOL) animated
{
NSLog (@ "now available");
}
Viewwillappear: (BOOL) animated does not perform