Thursday, 15 March 2012

ios - Unable to add text from UITextField to an Array -



ios - Unable to add text from UITextField to an Array -

currently have custom view table cell , text field above it. want text uitextfield , set nsmutablearray.

pseudocode:

string text = _textfield.text; [array addobject:text]; nslog{array}

in header file have created textfield , array.

i receive error : 'customtableview:[340:11303] array: (null)' when nslog.

i not sure why text textfield not getting added array. if 1 able help appreciated.

note - textfield above custom cell not in it. have tried adding string array straight , logging , same error. assume array.

did initialize array.take mutablearray , initialize it.

nsmutablearray *array=[nsmutablearray alloc]init];

ios arrays uitableview uitextfield gettext

No comments:

Post a Comment