ios - How to pass data from form FormSeetController to the ViewController? -
I am trying to use this package:
Now my question is, after I dismiss the formsheet, I am trying to cross the data between the form control controller.
{// Maybe I can use UIViewController * VC in my SearchGardenView (form sheet), but how? [Self-subscripted dysmic]; // Here I'm trying to get the baby gardenid but its always zero; };
And this is from the preset controller:
AddKid * kid = [[AddKid alloc] init]; NSArray * temp = [_responseDict value forKey: @ "id"]; Kid.kidgreenidid = [temp object endx: indexpath.ro]; [Self mz_dismissFormSheetControllerAnimated: Yes complete handler: ^ (MZFormSheetController * formSheetController) {// This rejects block formsheets}];
To see IM, it is necessary to pass the 'KJard IDD', but it is not always zero, even after this, I gave it as code above the show. Probably because the ViewController has already been loaded and when I came
I need to find a way to cross that data, can you please help me?
Edit I tried to use success with the representative, the representative is not called here My representative code is:
Set up the representative ( View Controller B)
@SearchSearchGardenTable; @protocol SearchGardenDelegate & lt; NSObject & gt; - (zero) addItemViewController: (SearchGardenTable *) controller didFinishWithGardenID: (NSString *) gardenID gardenname: (NSString *) Plantation and CityName: (NSString *) cityName; @end @interface searchgardentable: uTable Vuii Controller @ Property (nanatomic, weak) id & lt; SearchgearDialaget & gt; Representative; @end
VCB is saying that VC A is its representative:
self.searchGarden.delegate = self; // Setting the parameter vc A View Deidoad
I want to return from VCA to VCA:
_kidGaedenID = [temp objectAtIndex: indexPath .row]; _kidGardenName = [temp1 objectAtIndex: indexPath.row]; [Self. Delegate Ad Itamview Controller: did not do itself: FinnishWididIDID: _KidGayDedin GardenName: _kidGardenName andCityName: _kidCityName];
Apply Protocol method to VCA:
- (zero) addItemViewController: (SearchGardenTable *) controller didFinishWithGardenID: (NSString *) gardenID gardenName :( NSString *) Plantation and City name: (NSString *) City Name {_kidGardenID = gardenID; _gardenName.text = gardenName; _kidCity.text = cityName; }
You can try willDismissCompletionHandler. It is defined in the MZFormSheetController.h file. Type Parameter View Controller presented to your View Controller (Eclipse AddKid I) and you can access the properties of AddKit class here.
@property (nonatomic, copy) MZFormSheetCompletionHandler WillDismissCompletionHandler; Formheet.willDismissCompletionHandler = ^ (UIViewController * Presented ViewController) {(ViewController presenting AddKid) .kidGardenID // should now be accessible
};
Comments
Post a Comment