我为尺寸为(30,50)的标签创建触摸移动事件。这是代码
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
UITouch *touch = [touches anyObject];
UIView *superView = self.superview;
}
但是我需要确保标签只能在superview中移动。换句话说,UILabel在“触摸”视图边缘时会停止移动,如何设置标签的移动范围?
答案 0 :(得分:0)
<div ng-repeat="step in steps">
<button title="step.description">Text</button>
</div>
设置为否userInteractionEnabled