首先将默认的文件清理掉,这样你就可以真正的从头开始。在 Project Navigator中,选择 ViewController.swift ,右键点击,选择删除,然后选择 Move to Trash 。然后打开 Main.storyboard ,选择唯一的一个view controller然后删掉他。现在你有一个空的storyboard,可以在你的应用中添加主屏幕了。
- (void)addDottedLineFromImageView:(UIView *)bView {
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]
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)