我是新来的ios。我需要你的建议。 我看到的,我需要我的应用程序的东西有些实施:什么意见和控制使用ios
我知道如何使用文本框。我需要下面的布局(黑色标记,蓝色文本被翻译为“就绪”)。
你能告诉我它是如何调用在ios中,它是自定义还是它是从框中的一些标准视图(ios sdk)?也许如果你有一些链接,我可以在哪里找到实现。谢谢。
我是新来的ios。我需要你的建议。 我看到的,我需要我的应用程序的东西有些实施:什么意见和控制使用ios
我知道如何使用文本框。我需要下面的布局(黑色标记,蓝色文本被翻译为“就绪”)。
你能告诉我它是如何调用在ios中,它是自定义还是它是从框中的一些标准视图(ios sdk)?也许如果你有一些链接,我可以在哪里找到实现。谢谢。
1)它可以使用原生UI组件来完成
2)你需要创造一个自定义视图,你需要添加两个视图第一个是UIPickerView
&第二个是UIToolBar
3)下面是示例代码以用于将工具栏
4)确保您的工具栏架x是(总高度 - pickerView hieght -toolBar高度)
UIToolbar *keyboardToolbar = [[UIToolbar alloc]initWithFrame:CGRectMake(0, calcultedHeight, self.view.frame.size.width,44)];
//here adding your left buttons
UIBarButtonItem *btnDone = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(doneButtonAction)];
//here we are adding flexible space
UIBarButtonItem *btnFlexible = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:nil action:nil];
//here your ready button
UIBarButtonItem *btnReady = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(readyButtonAction)];
[keyboardToolbar setItems:[NSArray arrayWithObjects:btnFlexible, btnDone,btnReady, nil]];
谢谢你)这是我需要的 –
感谢您接受&upVote –
这听起来像你正在寻找一个UIPickerView。
的东西,看起来像这样:
a PickerView http://blog.apoorvmote.com/wp-content/uploads/2015/05/picker-w-1-column.png
[UIPickerView(https://developer.apple.com/library/ios/documentation/UIKit /参考/ UIPickerView_Class /) – luk2302