bView.layer.cornerRadius = 4
CAShapeLayer*borderLayer = [[CAShapeLayeralloc]init]
borderLayer.bounds= bView.bounds
borderLayer.position=CGPointMake(bView.centerX, bView.centerY)
borderLayer.path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0,0, 68, 68) cornerRadius:4].CGPath
borderLayer.lineWidth=1
borderLayer.lineDashPattern = @[@6,@4]//前边是虚线的长度,后边是虚线之间空隙的长度
borderLayer.lineDashPhase=0.1
borderLayer.fillColor=UIColor.clearColor.CGColor
borderLayer.strokeColor=BSHexColor(0xA6A8AB).CGColor
[bView.layeraddSublayer:borderLayer]
}
在VIEW的CREAT时将你的对话框(最好是以无模式对话框模式)创建并显示: 如下代码: m_pFaceDlg = new CInterFaceDlg//CInterFaceDlg 为你的对话框类 m_pFaceDlg->Create( IDD_DIALOG_INTERFACE, this )//IDD_DIALOG_INTERFACE为你的对话框ID。欢迎分享,转载请注明来源:内存溢出
评论列表(0条)