我正在开发一个应用程序,其中有一个集合视图(父视图)和一个 SWReveal'stable 视图。当我在表格视图中选择一行并关闭 Swreveal 视图控制器时。在父视图中,除了集合视图之外的所有数据都可用。集合视图变为空。这是我的代码
父视图.h
#import <UIKit/UIKit.h>
#import "MyNotificationsViewController.h"
#import "NotesandReminders.h"
#import "Cell.h"
#import "SWRevealViewController.h"
@interface TimeTableViewController : UIViewController <UICollectionViewDataSource, UICollectionViewDelegate,MJSecondPopupDelegate,UIAlertViewDelegate>
{
UIPopoverController *popoverController;
// IBOutlet UICollectionView *collectionData;
}
@property (nonatomic, retain) IBOutlet UICollectionView *collectionData;
父视图.m
-(void)TestMethod
{
NSLog(@"taggg %d ",tag);
NSLog(@"indexxx %@",indexPathsss);
NSLog(@"eht collection data %@",collectionData);
// [self ChangeCells];
}
SwREvel view controller .h
#import <UIKit/UIKit.h>
#import "LearningSearchCell.h"
#import "TimeTableViewController.h"
#import "AppDelegate.h"
@interface LearningSearchController : UIViewController<UITableViewDataSource,UITableViewDelegate>
@property(strong,nonatomic)TimeTableViewController *TimeObj;
@property(nonatomic,assign)AppDelegate *AppObj;
@end
SwReveal 视图控制器.M
-(void)viewWillDisappear:(BOOL)animated
{
_TimeObj=[TimeTableViewController alloc];
[_TimeObj TestMethod];
//from here i call the Test method of parent view controller... i am getting all values except the collection view becomes null
}
我什至尝试创建属性并对其进行综合..它仍然为空