jjzjj

lightGrayColor

全部标签

ios - 如何在 objective-c 的 View Controller 上获取自定义 TableViewCell 值

我是iOS新手,我面临着从自定义表格View单元格值获取值到ViewController的问题。在我的自定义表格View单元格中,单击时有4个按钮我在customtableviewcell的UILabel中获取值我想将UILabel值传递给ViewController。我的代码在customtableviewcell.m中是这样的-(void)awakeFromNib{passbtn.layer.cornerRadius=passbtn.bounds.size.width/2.0;//thisvaluevaryasperyourdesirepassbtn.clipsToBounds=Y

ios - 为 UIButton 设置边框

我正在尝试为UIButton保留边框。如果我使用以下代码,它会正常工作。案例:1[[_myButtonlayer]setBorderWidth:1.0f];[[_myButtonlayer]setBorderColor:[UIColorlightGrayColor].CGColor];但在我写之前:self.baseTypeButton.layer.borderWidth=2.0f;self.myButton.layer.borderColor=[UIColorlightGrayColor];XCode建议我做现在我的代码改变了,但是在这种情况下我没有设置边框:案例:2_myButto