草庐IT

Section_SectionName_TextField

全部标签

ios - UISearchController:UITableView 的 Section Index 与 searchBar 重叠

我正在构建一个使用新的UISearchController的iOS8应用程序。在与搜索Controller相关的TableView中,我正在使用部分索引让用户从表的一个部分快速跳到下一个部分。它工作得很好,但部分索引与表/搜索Controller上的搜索栏重叠。以前有没有人遇到过这个问题,如果有,您是如何解决的?下面是我如何初始化我的搜索Controller:self.resultsTableController=[self.storyboardinstantiateViewControllerWithIdentifier:[SelectSpecialtySearchResultsTV

iphone - 如果我们点击 UITableView 中的 Custom Section Header,然后将该部分移动到顶部

我在UITableView中有一个CustomSectionHeader,在该节标题上,在其最右边放置了UIButton。我想要的是,如果我点击UIButton,那个特定的SectionHeader应该滚动到顶部。就是这样任何建议,一段代码都会受到赞赏。 最佳答案 第1步:设置章节标题的大小。示例如下。-(CGFloat)tableView:(UITableView*)tableViewheightForHeaderInSection:(NSInteger)section{return55;}第2步:创建并返回自定义部分标题。-(U

ios - NativeScript TextField [(ngModel)] 不起作用

我在通过ngModel进行TextField数据绑定(bind)时遇到问题我有模型课exportclassProduct{name:stringdescription:stringimageUrl:string}查看:和Controller:import{Component,OnInit,OnDestroy,ViewChild,ElementRef}from"@angular/core"import*asFirebasefrom"nativescript-plugin-firebase"import*ascamerafrom"nativescript-camera";import{Im

ios - 无效更新 : invalid number of rows in section

我正在使用MicrosoftAzure服务开展一个项目。在删除一行时出现此错误:Terminatingappduetouncaughtexception'NSInternalInconsistencyException',reason:'Invalidupdate:invalidnumberofrowsinsection0.Thenumberofrowscontainedinanexistingsectionaftertheupdate(2)mustbeequaltothenumberofrowscontainedinthatsectionbeforetheupdate(2),plus

iOS 7 XCode 5 - 带有 TextField 的 UIAlertView - 如何将文本拉入标签或 NSString?

这个问题在这里已经有了答案:TakingTextFromaUIAlertView(4个答案)关闭8年前。UIAlertView*alertViewChangeName=[[UIAlertViewalloc]initWithTitle:@"ChangeName"message:@"Whatisyourteacher'sname?"delegate:selfcancelButtonTitle:@"Cancel"otherButtonTitles:nil];alertViewChangeName.alertViewStyle=UIAlertViewStylePlainTextInput;[a

ios - 如何识别哪个 textField 在动态创建的包含 2 个 uiTextFields 的 UITableCell 上触发了 textFieldDidEndEditing?

我在iOS6xcode4.6.2上使用Storyboard。我正在使用动态UITableView,它由许多单元格组成,每个单元格上都有两个UITextFields。这两个字段在自定义单元格中定义为@property(strong,nonatomic)IBOutletUITextField*lowRangeField;@property(strong,nonatomic)IBOutletUITextField*highRangeField;我想用-(void)textFieldDidEndEditing:(UITextField*)textfield获取值并将其保存到核心数据存储中。现在

ios - TextField 为空时返回 nil

我正在为iOS7准备我的应用程序,但遇到一个奇怪的问题:当我尝试获取一个空的TextField文本时,我得到“nil”,而在过去它用于返回@""(空字符串)。这是正式更改还是错误?谢谢沙尼 最佳答案 这是iOS6到iOS7的正式变化。文本字段过去返回一个空字符串,但现在您有一个nil字符串。@property(weak,nonatomic)IBOutletUITextField*tf;//iOS6if(![self.tf.textisEqualToString:@""]){//iOS7if(self.tf.text!=nil&&![

swift - 逗号自动添加到 Swift 中的 TextField

我正在开发状态栏应用程序。目前我只有一个下拉菜单,可以退出应用程序或打开首选项窗口。窗口中有一个文本字段,用于输入数值。在测试时,我注意到当我使用.orderOut隐藏窗口时,我的号码中会出现一个逗号。不知道为什么会这样,也不知道我能做些什么来阻止它。@IBOutletweakvarstatusMenu:NSMenu!@IBOutletweakvarprefWindow:NSWindow!@IBOutletweakvarartSizeStepper:NSStepper!@IBOutletweakvarartSizeTextField:NSTextField!varartSize=100

ios - 无法在 TextField 中键入

我正在使用SwiftUI框架创建一个SignUp屏幕。我有两个文本框,FirstName和LastName,还有一个按钮。我将它们分组到一个VStack中。当我运行应用程序时,按钮是可点击的,但我无法在文本字段中输入任何内容。这是我的代码:@StatevarfirstName=""@StatevarlastName=""varbody:someView{NavigationView{VStack{VStack{VStack{Group{TextField($firstName,placeholder:Text("FirstName")).padding(10)}.background(

ios - 更改 textField 时从其他 View Controller 更改变量

我正在尝试根据textField的值更改两个不同ViewController中变量的值,但我不明白如何使用委托(delegate)使其工作。我的Storyboard:我的代码:主视图:classGameCreatingViewController:UIViewController{varnewGame=Game()overridefuncviewDidLoad(){super.viewDidLoad()newGame=Game()newGame.playerBook.NumberOfPlayers=2ifletvc=self.children.first(where:{$0isPlay