私は問題に行き詰まりました。いくつかのビュー コントローラーを含むストーリーボードがあります。
私がする必要があるのは、PikerView が配列をアップロードする場所 (隣人ではなく、セグエ経由で接続されていない)FirstViewController
から配列を渡す必要があることです。SecondViewController
その後、選択した結果を に渡す必要がありますThirdViewController
。タブバービューコントローラーに接続され、プッシュセグエ経由で接続されFirstViewController
ているアプリケーションをタブ化しました。SecondViewControllers
ThirdViewController
SecondViewController
First から Second にデータ フォームを渡す方法を確認する
CategoryExpencesViewController.h
#import <UIKit/UIKit.h>
#import "AddCategoryViewController.h"
#import "CategoryPickerViewController.h"
@interface CategoryExpencesViewController : UITableViewController <AddCategoryViewControllerDelegate>
@property(nonatomic, weak) IBOutlet UIBarButtonItem *editButton;
@property(nonatomic, strong) NSMutableArray *categories; //list of category items
@property(nonatomic, strong) NSMutableArray *listOfCategories; //list of category names
CategoryExpencesViewController.m
-(void)updateArray
{
CategoryPickerViewController *controller = [[CategoryPickerViewController alloc]init];
controller.categoryList = [[NSMutableArray alloc]init];
controller.categoryList = listOfCategories;
NSLog(@"%d", [listOfCategories count]);
NSLog(@"%d", [controller.categoryList count]);
}