我在XCode中进行编程,只是尝试获取基本的"创建一个框,并将其从一组坐标设置为另一组#34;但我无法在线查找任何内容就这么简单。有人可以向我解释一下吗?
答案 0 :(得分:0)
试试这个:
pd.concat([pd.Series(v, [k] * len(v)) for k, v in listDict.items()]) \
.rename_axis('subj_id').reset_index(name='urls')
如果您想将对象移动到不同的位置,可以这样做:
//Add the initial box
UIView* boxView = [[UIView alloc] initWithFrame:CGRectMake(50, 50, 60, 60)];
CAShapeLayer *boxLayer = [CAShapeLayer layer];
//set colors
[boxLayer setStrokeColor:[[UIColor redColor] CGColor]];
[boxLayer setFillColor:[[UIColor clearColor] CGColor]];
[boxLayer setPath:[[UIBezierPath bezierPathWithRect:boxView.bounds] CGPath]];
[boxView.layer addSublayer:boxLayer];
[self.view addSubview:boxView];
//Animate box
[UIView animateWithDuration:0.7 animations:^{
[boxView setTransform:CGAffineTransformMakeTranslation(100, 100)];
} completion:^(BOOL finished) {
}];