我有一个自定义的UITableView单元格,它有一个按钮和一个标签.当有人点击按钮时,我会触发一个方法,然后为该行着色.一切正常.
我想要真正做的是
我的代码如下(BackView是我的自定义单元格中的视图)
CAGradientLayer *layer = [CAGradientLayer layer];
layer.frame = BackView.bounds;
UIColor *cOne = [UIColor paleYellowColor];
UIColor *cTwo = [UIColor whiteColor];
NSArray *colors = [NSArray arrayWithObjects:(id)cOne.CGColor,
cTwo.CGColor, nil];
layer.colors = colors;
NSNumber *stopOne = [NSNumber numberWithFloat:0.00];
NSNumber *stopTwo = [NSNumber numberWithFloat:0.8];
NSArray *locations = [NSArray arrayWithObjects:stopOne, stopTwo, nil];
layer.locations = locations;
CABasicAnimation *animateLayer = [CABasicAnimation animationWithKeyPath:@"colors"];
animateLayer.fromValue = [UIColor paleYellowColor];
animateLayer.toValue = [UIColor whiteColor];
animateLayer.duration = 3.0;
animateLayer.removedOnCompletion = YES;
animateLayer.fillMode = kCAFillModeBoth;
animateLayer.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear];
[layer …Run Code Online (Sandbox Code Playgroud) 我是Objective-C/XCode的完全新手,到目前为止它有点令人生畏.我希望通过构建包含一些概念的东西来弄脏我的手.
我想要做的就是有一个表,该表由SQLite数据库中的行填充.该表应具有重新排序功能,我想拥有一个主演设施,然后删除(我认为是标准的)
当然,我可以通过查看一些示例项目来解决这个问题,但我想知道是否有一个好的示例项目具有这些功能,我可以将其视为一个起点.如果没有,也谢天谢地接受任何其他推荐的样本项目.