开发者

How to use the values of pickerview with textview?

开发者 https://www.devze.com 2022-12-10 05:17 出处:网络
How to use the combine the data of picker view with Text开发者_运维百科 view and use that both value in next view?As I understand, you want to use you picker\'s value and textView value in the next vi

How to use the combine the data of picker view with Text开发者_运维百科 view and use that both value in next view?


As I understand, you want to use you picker's value and textView value in the next view. First variant - to make 2 properties in your next viewController and set them before pushing new viewController into stack. The second one - you can write your own initialization method, for example

- (id) initWithTextViewValue:(NSString*)textViewValue{
    if(self = [super init]){
        textInCurrentController = textViewValue;
    }
    return self;
}

And so on. Then you just can create your controller

[[MyViewController alloc] initWithTextViewValue:textView.text];
0

精彩评论

暂无评论...
验证码 换一张
取 消