标签:
写法1:
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { // Get the new view controller using [segue destinationViewController]. // Pass the selected object to the new view controller. if ([segue.identifier isEqualToString:@"ProjectDetailsSegue"]) { ProjectDetailsViewController *detailsVC = segue.destinationViewController; detailsVC.idString = sender; }
写法2:
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { // Get the new view controller using [segue destinationViewController]. // Pass the selected object to the new view controller. if ([[segue destinationViewController] isKindOfClass:[EZWifiConfigViewController class]]) { ((EZWifiConfigViewController *)[segue destinationViewController]).ssid = self.nameTextField.text; ((EZWifiConfigViewController *)[segue destinationViewController]).password = self.passwordTextField.text; } }
ios - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender 的写法
标签:
原文地址:http://www.cnblogs.com/codemakerhj/p/5751744.html