gpt4 book ai didi

ios - 在文本字段中获取电话号码以在按下按钮时调用电话

转载 作者:行者123 更新时间:2023-11-28 23:14:39 25 4
gpt4 key购买 nike

该应用程序只是想让用户在文本字段中输入电话号码,然后当点击按钮时,它会调用该号码。最好的代码是什么?我已经在我的 nib 文件中创建了一个按钮和一个文本字段。

我正在使用 Xcode 4。

最佳答案

-(IBAction)numberButtonPressed:(UIButton *)pressedButton
{

self.phoneNumberLabel.text = [self.phoneNumberLabel.text stringByAppendingString: pressedButton.titleLabel.text];

}

你可以在这里看看 turorial:
http://mobile.tutsplus.com/tutorials/iphone/design-build-a-1980s-ios-phone-app-making-phone-calls/

关于ios - 在文本字段中获取电话号码以在按下按钮时调用电话,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6977445/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com