Search Results

Search found 4 results on 1 pages for 'chrizzz'.

Page 1/1 | 1 

  • How to store UISegmentedControle state in NSUserdefaults

    - by Chrizzz
    The problem is when de selectedSegmentIndex is unselected: "UISegmentedControlNoSegment" alias "-1". The other states (0, 1, 2 , etc.), I can store as Integers and retrieve with carTypeSegmentedControl.selectedSegmentIndex = [defaults integerForKey:@"typeOfCar"]; But -1 is no NSInteger. I also tried to remove the Integer out of the NSUserdefaults but a request would return an "0", which is not acceptable. So, is there another easy way? tnx for reading

    Read the article

  • How to push text from one UITextfield to another UITextfield in the next View? And back!?

    - by Chrizzz
    an Hi, I have an UITextField in one view, UITextField A in View A. And I have another in view B, UITextField B in View B. I use a Navigation Controller Bar to switch between the views. The UITextFields are properties and connected Outlets of both views A and B. On my view A there is an "Options"-button which pushes view B. So when you are typing in Textfield A, I would like the same text to appear in Textfield B. When you edit TextField B and you go back to view A (via the "Title View A"-button in de navigation bar), I would like the same text to re-appear in Textfield A. I expected this to be easy. But I can't get it working. I tried: ViewBController *controller = [[ViewBController alloc] initWithNibName:@"ViewBController" bundle:nil]; controller.TextFieldA.text = TextFieldB.text But nothing appeared in view B. And how do I get back? I dont want to use NSUserdefaults because I would have to remove the values also.

    Read the article

1