开发者

How can I take values from textbox and assign it to integer variable in Xcode?

how can I convert the valuesof textbox to numeric? here's what I'm doing:

int el = electric开发者_Go百科.text;
int wb = waterbill.text;
int inet = internet.text;


Try this:

int el = [electric integerValue];
int wb = [waterbill integerValue];
int inet = [internet integerValue];


Try this:

NsInteger el = [electric.text integerValue];
NsInteger wb = [waterbill.text integerValue];
NsInteger inet = [internet.text integerValue];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜