-1

need a little bit help. How I could save a Number from a textfield into a NSInteger variable?

I got this propertys:

@property(weak, nonatomic) IBOutlet UITextField *textFieldPort;
@property NSInteger *portTemp;

And I want something like this:

_portTemp = _textFieldPort.text;

I need the variable to pass through

CFStreamCreatePairWithSocketToHost(NULL, (__bridge CFStringRef)address, port, NULL, &writeStream);

Anyone any idea?

shizophren
  • 21
  • 7

1 Answers1

0

It's really easy to do that mate, try this

_portTemp = [_textFieldPort.text integerValue];
Thilina Chamath Hewagama
  • 9,039
  • 3
  • 32
  • 45