In my app Iphone, I want to do a simple thing like : I have a GroupDetailViewController with a text Field and a button. When user press the button I want to send the text from textfield to another class ItemViewController and set this text to a label. I have no idea how can I do this. I am new on Iphone,I have done just some tutorials. I have looked here : How to send text field value to another class but I dont understand the answer. Can anyone explain me or give me an example?
相关问题
- CALayer - backgroundColor flipped?
- What uses more memory in c++? An 2 ints or 2 funct
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- how do you prevent page scroll in textarea on mobi
相关文章
- Could I create “Call” button in HTML 5 IPhone appl
- Unable to process app at this time due to a genera
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
- Open iOS 11 Files app via URL Scheme or some other
- Can keyboard of type UIKeyboardTypeNamePhonePad be
- NameError: name 'self' is not defined, eve
- Can not export audiofiles via “open in:” from Voic
Let us assume that your second class is SecondViewController.
Now in SecondViewController declare one
NSString
and set its properties.SecondViewController.h
SecondViewController.m
Now in GroupDetailViewController, on button touch event, put the value from textfield in
strTextValue
.Put
strTextValue
in label created in SecondViewControllerSecondViewController.m
Quick Solution:
Create a shared application delegate and set the value to a string in delegate and reuse it. 1) create an NSString variable say passVal and synthesize it in youtAppDelegate file. 2) In GroupDetailViewController
3) In ItemViewController