草庐IT

ion-segment-button

全部标签

swift - Rx swift : enable/disable button based on textfields are not empty

我必须使用RxSwift根据两个文本字段上的字符数启用一个按钮@IBOutletweakvaruserTextField:UITextField!@IBOutletweakvarpasswordTextField:UITextField!@IBOutletweakvarbuttonToEnableDisable:UIButton!varenabledObservable=combineLatest(userTextField.rx_text,passwordTextField.rx_text){(user,password)inself.loginButton.enabled=a.ch

ios - 在 Button Swift 中通过标签发送行和部分

我在cellForRowAtIndexPath里面有这个cell.plusBut.tag=indexPath.rowcell.plusBut.addTarget(self,action:"plusHit:",forControlEvents:UIControlEvents.TouchUpInside)这个函数在外面:funcplusHit(sender:UIButton!){buildings[sender.tag].something=somethingElse}是否可以发送indexPath.rowandindexPath.section或其他替代方案?谢谢!编辑我是这样处理的:我

ios - 命令因信号 : Segmentation fault: 11 compile error 而失败

我花了很多时间尝试自己解决这个问题,并且已经仔细检查了SO上的可用答案,但出现了同样的错误。所以这里列出了我已经从可能的原因中排除的事情:表明框架没有问题here.我创建了另一个具有相同框架集的项目,一切正常没有issuewithSwiftyJSON,在测试项目中也能正常工作代码中没有突出显示的编译问题我使用比较工具检查了两个不同的project.pbxproj文件(来self的原始项目和新的测试项目),以发现项目设置中的一些差异,都是一样的我还比较了两个项目的构建命令选项,结果都是一样的当我转到ReportNavigator并查找每个未成功编译的文件时,我发现了一些奇怪的相关性:任何

ios - 由于信号 : Segmentation fault: 11,MKMapViewDelegate 命令失败

当我实现这个方法时,MKMapViewDelegate有一个非常奇怪的问题,给我一个我不明白的错误错误只有在我删除整个函数时才会消失,我试图让一个空函数返回nil但给我同样的错误。funcmapView(mapView:MKMapView!,viewForAnnotationannotation:MKAnnotation!)->MKAnnotationView!{ifannotation.isKindOfClass(MKUserLocation.classForCoder()){returnnil}letAnnotationIdentifier:NSString="Annotation

Swift - 从单元格内的 Button Segue

我有一个附加到TableViewCell类的自定义单元格,并且我在该自定义单元格内有一个按钮,我想要乳清我按下按钮它会转到另一个ViewController,但是:performSegueWithIdentifier(identifier:String,sender:AnyObject?)函数无法识别,如何解决?编辑: 最佳答案 -performSegueWithIdentifier:方法在UIViewController中声明。所以你不能只在UITableViewCell子类中调用它。当您在-tableView:cellForRo

ios - 调试合并.swiftmodule : segmentation fault: 11

我正在尝试使用XCodev.6.3(6D520o)编译Swift1.2iOS项目。它通过“编译Swift源文件”:0:error:unabletoexecutecommand:Segmentationfault:11:0:error:merge-modulecommandfailedduetosignal(use-vtoseeinvocation)并在“MergeProject.swiftmodule”时崩溃。Clang的堆栈跟踪:0swift0x000000010ffa8d38llvm::sys::PrintStackTrace(__sFILE*)+401swift0x0000000

swift - 命令因信号 : Segmentation fault: 11 while emitting IR SIL function 而失败

我想在UITextView的扩展中添加闭包属性,所以我使用typealias定义了一个闭包:typealiasTextViewHeightDidChangedClosure=(_currentTextViewHeight:CGFloat)->VoidextensionUITextView{funcsetTextViewHeightDidChanged(textViewHeightDidChanged:TextViewHeightDidChangedBlock){objc_setAssociatedObject(self,&TextViewHeightDidChangedBlockKey

java - org.eclipse.swt.widgets.Button 点击​​代码

我正在尝试从代码中单击按钮。我想做以下事情:classMyMouseAdapterextendsMouseAdapter{publicvoidmouseDown(MouseEventevt){System.out.println("Working!!!!");}}Buttonbutton=newButton();button.addMouseListener(newMyMouseAdapter());现在我想从代码中运行mouseDown方法,你能告诉我怎么做吗?谢谢。 最佳答案 你可以这样做:button.notifyListen

安卓 : How to set onClick event for Button in List item of ListView

我想为Listview项中使用的按钮添加onClick事件。如何为列表项中的按钮提供onClick事件。 最佳答案 在适配器类中publicViewgetView(finalintposition,ViewconvertView,ViewGroupparent){LayoutInflaterinflater=getLayoutInflater();Viewrow=inflater.inflate(R.layout.vehicals_details_row,parent,false);ButtondeleteImageView=(Bu

安卓 : How to set onClick event for Button in List item of ListView

我想为Listview项中使用的按钮添加onClick事件。如何为列表项中的按钮提供onClick事件。 最佳答案 在适配器类中publicViewgetView(finalintposition,ViewconvertView,ViewGroupparent){LayoutInflaterinflater=getLayoutInflater();Viewrow=inflater.inflate(R.layout.vehicals_details_row,parent,false);ButtondeleteImageView=(Bu