How do I pass variables between view controllers?

前端 未结 6 1410
礼貌的吻别
礼貌的吻别 2020-12-06 20:21

i\'m having a hard time with Xcode; for some reason, it just won\'t let me pass a variable from one view controller class to another. It should work, i was basically just co

6条回答
  •  被撕碎了的回忆
    2020-12-06 21:14

    Ok i've had it; using a cheap trick to show the info:

    UIAlertView *myAlertView = [[UIAlertView alloc] initWithTitle:ffs message:@"this gets covered" delegate:self cancelButtonTitle:@"Cancel" otherButtonTitles:@"OK", nil];
        UILabel *myTextField = [[UILabel alloc] init];
        myTextField.text = @"FFS!";
        CGAffineTransform myTransform = CGAffineTransformMakeTranslation(0.0, 130.0);
        [myAlertView setTransform:myTransform];
    
        [myTextField setBackgroundColor:[UIColor whiteColor]];
        [myAlertView addSubview:myTextField];
        [myAlertView show];
        [myAlertView release];
    

    Really hate using this, but i'm already a day late. I should have delivered it by yesterday.

    Thanks for your help guys, if you happen to find the solution please let me know. You never know if it'll happen again :/

    Cheers!

提交回复
热议问题