用这个把头发拉出来。使用xCode 8.2.1并尝试更改"返回键"在键盘上。
尝试:
通过代码:
#include <iostream> #include <sstream> #include <Windows.h> #include <string> int *char_to_pointer(std::string input); int main() { int sample = 100; // lets say this address is 0xc1f1 std::string input_; std::cout << "addr:" << &sample << std::endl; std::cout << "what is the memory address?:" << std::endl; std::cin >> input_; int *inp = char_to_pointer(input_); std::cout << "imp: " << inp << std::endl; std::cout << "imp*: " << *inp << std::endl;//This was my solution std::cout << "imp&: " << &inp << std::endl; Sleep(10000); return 0; } int *char_to_pointer(std::string input) { return (int *)std::stoul(input, nullptr, 16); }
我可以确认IBOutlet @IBOutlet var password : UITextField?
override open func viewDidLoad() {
password?.returnKeyType = .next
password?.reloadInputViews()
}
也已设置。
这发生在我在应用程序中的每个故事板视图中,没有任何改变键盘设置。
模拟器和设备上的结果相同。