iphone - Problem with UITextView -


When a string is generated from a UITextview, with a view controller trying to pass the string near the other view controller There is a strange problem near UITextfield's UITextview.text and UITextfield.text are both types of NSString.

Depending upon the type of field, the following code either takes Textfield.text or Textview.text and puts it in a string named string.

NSString * aString = [[NSString alloc] init]; If (fieldType == 3) {aString = textView.text; } And {aString = textField.text; }

When I check aString on any case, I can see that it has successfully assigned the text to a string.

Then I use the string other view controller by using this code.

  [Representative update site: aString: editedFieldKey: fieldType]; [Self. Navigation Controller PopWebControllerUnited: Yes];  

This works fine if aString was generated from textfield.text but no visible string is made by textview.text, but nothing except the View Controller < / P>

This is the code that takes Astring and stuff with it, although it does not execute the first line of code "NSLog (@" Returned Object:% @, Field Type:% @ ", Astring, Edited fields); " If any string is from textview.text, any help would be appreciated.

  - (zero) update site: (NSString *) Astering: (NSString *) of the edited field: (int) fieldType {NSLog (@ "Returned object:% @, Field type: % @ ", Estring, edited files); Switch (field type) {case 0: // string [adicect set value: estring foreke: edited field]; NSLog (@ "string set% @", [adicevite valuation: edited field]); break; Case 1: // Int [Adicect Set Value: [NSNumber NumberAttah: Astring.Invaluation] for: editedFieldkey]; NSLog (@ "Integer Set"); break; Case 2: // Float NSLog (@ "Savings Value Floating"); [Adicect Set Value: [NSNumber Number Exploded: Estring. Floyd Value] for: Edited Farde]; NSLog (@ "float set"); break; Case 3: // Text view [AdSite Set Value: Astring Fork: Edited Field]; NSLog (@ "Text View Text Saved"); Default: Break; } [Self.tableViewReloadData]; Oh, it looks weird but I think your syntax is wrong:  

  [Rep. Updates site: aString: editedFieldKey: fieldType];  

should be

  [Representative update site: estring edit field of field type];  

And the name of the method:

  - (zero) Update site: (NSString *) Astering: (NSString *) editedFieldKey: (int) fieldType; Should be:  
  - (zero) Update site: (NSString *  

Can you try it?


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -